Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
breadchris committed Mar 13, 2024
1 parent 6b057e8 commit df5f3ad
Show file tree
Hide file tree
Showing 21 changed files with 2,039 additions and 583 deletions.
6 changes: 6 additions & 0 deletions client/esbuild.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ const devBuild = process.env.DEV === "true";
const minify = !devBuild;
const nodeEnv = devBuild ? '"development"' : '"production"';

try {
await fs.mkdir("public/build", { recursive: true });
} catch (error) {
console.error('Error occurred while creating the build directory:', error);
}

async function copyFile(source, destination) {
try {
await fs.copyFile(source, destination);
Expand Down
2 changes: 1 addition & 1 deletion client/src/routes/Computer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const Computer = () => {
{comp.loading ? (
<div className={"flex flex-col text-center"}>
<div className="loading loading-spinner loading-lg"></div>
<span>Setting up computer...</span>
<span>There is someone who is working on making sure you have a computer. Go back to solving challenges and check back here later. If you have been waiting for like 30 minutes for a computer, it is reasonable to let someone know.</span>
</div>
) : (
<iframe className={"h-screen w-full"} src={comp.url} />
Expand Down
6 changes: 6 additions & 0 deletions client/src/rpc/xctf/xctf_pb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export class SetComputerRequest extends Message<SetComputerRequest> {
*/
password = "";

/**
* @generated from field: string computer_id = 3;
*/
computerId = "";

constructor(data?: PartialMessage<SetComputerRequest>) {
super();
proto3.util.initPartial(data, this);
Expand All @@ -31,6 +36,7 @@ export class SetComputerRequest extends Message<SetComputerRequest> {
static readonly fields: FieldList = proto3.util.newFieldList(() => [
{ no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 2, name: "password", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "computer_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
]);

static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetComputerRequest {
Expand Down
1 change: 1 addition & 0 deletions deploy/shell/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shells/
2 changes: 1 addition & 1 deletion deploy/shell/passwords.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"shell-0": "zw0Y7vxzY1liENSP", "shell-1": "MrIhxjrh4Fkftmnl"}
{"shell-0": "0", "shell-1": "1", "shell-2": "2", "shell-3": "3", "shell-4": "4", "shell-5": "5", "shell-6": "6", "shell-7": "7", "shell-8": "8", "shell-9": "9", "shell-10": "10", "shell-11": "11", "shell-12": "12", "shell-13": "13", "shell-14": "14", "shell-15": "15", "shell-16": "16", "shell-17": "17", "shell-18": "18", "shell-19": "19", "shell-20": "20", "shell-21": "21", "shell-22": "22", "shell-23": "23", "shell-24": "24", "shell-25": "25", "shell-26": "26", "shell-27": "27", "shell-28": "28", "shell-29": "29", "shell-30": "30", "shell-31": "31", "shell-32": "32", "shell-33": "33", "shell-34": "34", "shell-35": "35", "shell-36": "36", "shell-37": "37", "shell-38": "38", "shell-39": "39", "shell-40": "40", "shell-41": "41", "shell-42": "42", "shell-43": "43", "shell-44": "44", "shell-45": "45", "shell-46": "46", "shell-47": "47", "shell-48": "48", "shell-49": "49", "shell-50": "50", "shell-51": "51", "shell-52": "52", "shell-53": "53", "shell-54": "54", "shell-55": "55", "shell-56": "56", "shell-57": "57", "shell-58": "58", "shell-59": "59", "shell-60": "60", "shell-61": "61", "shell-62": "62", "shell-63": "63", "shell-64": "64", "shell-65": "65", "shell-66": "66", "shell-67": "67", "shell-68": "68", "shell-69": "69", "shell-70": "70", "shell-71": "71", "shell-72": "72", "shell-73": "73", "shell-74": "74", "shell-75": "75", "shell-76": "76", "shell-77": "77", "shell-78": "78", "shell-79": "79", "shell-80": "80", "shell-81": "81", "shell-82": "82", "shell-83": "83", "shell-84": "84", "shell-85": "85", "shell-86": "86", "shell-87": "87", "shell-88": "88", "shell-89": "89", "shell-90": "90", "shell-91": "91", "shell-92": "92", "shell-93": "93", "shell-94": "94", "shell-95": "95", "shell-96": "96", "shell-97": "97", "shell-98": "98", "shell-99": "99", "shell-100": "100", "shell-101": "101", "shell-102": "102", "shell-103": "103", "shell-104": "104", "shell-105": "105", "shell-106": "106", "shell-107": "107", "shell-108": "108", "shell-109": "109", "shell-110": "110", "shell-111": "111", "shell-112": "112", "shell-113": "113", "shell-114": "114", "shell-115": "115", "shell-116": "116", "shell-117": "117", "shell-118": "118", "shell-119": "119", "shell-120": "120", "shell-121": "121", "shell-122": "122", "shell-123": "123", "shell-124": "124", "0": "0", "1": "1", "2": "2", "3": "3", "4": "4", "5": "5", "6": "6", "7": "7", "8": "8", "9": "9", "10": "10", "11": "11", "12": "12", "13": "13", "14": "14", "15": "15", "16": "16", "17": "17", "18": "18", "19": "19", "20": "20", "21": "21", "22": "22", "23": "23", "24": "24", "25": "25", "26": "26", "27": "27", "28": "28", "29": "29", "30": "30", "31": "31", "32": "32", "33": "33", "34": "34", "35": "35", "36": "36", "37": "37", "38": "38", "39": "39", "40": "40", "41": "41", "42": "42", "43": "43", "44": "44", "45": "45", "46": "46", "47": "47", "48": "48", "49": "49", "50": "50", "51": "51", "52": "52", "53": "53", "54": "54", "55": "55", "56": "56", "57": "57", "58": "58", "59": "59", "60": "60", "61": "61", "62": "62", "63": "63", "64": "64", "65": "65", "66": "66", "67": "67", "68": "68", "69": "69", "70": "70", "71": "71", "72": "72", "73": "73", "74": "74", "75": "75", "76": "76", "77": "77", "78": "78", "79": "79", "80": "80", "81": "81", "82": "82", "83": "83", "84": "84", "85": "85", "86": "86", "87": "87", "88": "88", "89": "89", "90": "90", "91": "91", "92": "92", "93": "93", "94": "94", "95": "95", "96": "96", "97": "97", "98": "98", "99": "99", "100": "100", "101": "101", "102": "102", "103": "103", "104": "104", "105": "105", "106": "106", "107": "107", "108": "108", "109": "109", "110": "110", "111": "111", "112": "112", "113": "113", "114": "114", "115": "115", "116": "116", "117": "117", "118": "118", "119": "119", "120": "120", "121": "121", "122": "122", "123": "123", "124": "124", "0": "29tg2JbhoWN1mJu6", "1": "RFO7mFpdZsM2Gr5O", "2": "PIpXytmsUF3tpcCe", "3": "yo6YcGRLDiRayVSm", "4": "DR2UBOGP1Lq5fSi7", "5": "O2CRhLWQpE2PaS64", "6": "jv6uvHaFKulSkIUh", "7": "QyrMdFcefblrMX7i", "8": "RG7Bce9j7mx5GYNJ", "9": "NvbZTzmS3jGlwhDE", "10": "QCOBR3eNi54YFO2b", "11": "GCHvnGFkMzDzfDmf", "12": "2SqAQ8KiYn8BanMK", "13": "yiKtlgnmFO4pV7k1", "14": "tcQ6Utg9zPm4ayJI", "15": "g0Je9E3s3jCsEm35", "16": "usc2dFI0T9s5mb2x", "17": "guck6zdGsJv7HCLa", "18": "NsTv7Z1eicrPnipJ", "19": "ZMbbqS6TbHRjWWa6", "20": "OEQUPfVm4gQpDuRI", "21": "BAPGFJB14jYJEIt4", "22": "BoyeCNBqudiJj2Mm", "23": "r46CqHN8rIqpUDJ5", "24": "v7vFYttaWCI5LIKT", "25": "YvADxoK8mAApkwoZ", "26": "4REJTbyEHhUY5XPd", "27": "dbQB4OodrdwhhNIL", "28": "aIAMUit025zj6BuO", "29": "dAEKyqeud6ELlP5G", "30": "boK6Og3FbCCku93y", "31": "82VdFnFTF2rl8IBp", "32": "GGBXGmkeKWZ5ZZF1", "33": "C0Ejb1lnIyhNUhTn", "34": "HSwxo4MtK2w1BJTK", "35": "m79ubX9MKgCQBW5l", "36": "iuFpi3Y2wQ2HvD89", "37": "ew2r61Pu1wcAsUiU", "38": "6Pi192CxUwoAr0g9", "39": "6K1idcXdnT6npyzY", "40": "azUQtTXG69xt5gC9", "41": "REmByEZ6E2g3ZPUX", "42": "RxHhS7HZM8AWk24f", "43": "Qi2knXCubBlSS6Mu", "44": "PM8EuS7XKgkY8WMa", "45": "YGJMZuuuWDiYBSCY", "46": "5pRBWUgaKv8LHCDo", "47": "P8toE2O815kZNxZA", "48": "fCiJq8Bfdq4FcwZe", "49": "IJQSxcL0EcJVkQS6", "50": "sqH45Lzy6nQ2cFzs", "51": "rhBWOC5kFsSreIu0", "52": "6sdzJoEZlsdxy9hx", "53": "PkP4XOWr5P9rNm1y", "54": "eQbaC0OT9sRLfp20", "55": "BIPYWDvxN7NQywVV", "56": "QUmyiM4pwWSooObP", "57": "ERKOS2CHck9nejDw", "58": "kD8XifGMdZ6NJkEh", "59": "HAzRu7qNg9oXYKDN", "60": "apn3B4JjqB1crYMR", "61": "esdZi6OhR3CJ9Vew", "62": "3sCkBegj0ximiK7l", "63": "yNQyvnCDJ92OxNzf", "64": "vDSe5wUsXnYWjZgS", "65": "tp9xcIBKSmbMrRQh", "66": "mBaigpeA77TkQ1iD", "67": "QykUO5njGCO2jRMj", "68": "TxFkXOCKO75JqTED", "69": "4cg839MI52Zzee2b", "70": "lwkn29CgNit7eGBg", "71": "t3LJe4dINMxNv1GS", "72": "g0a3KUkttkH0dmUj", "73": "bnGvsd3vFR9SomJY", "74": "NlXObgFKzPfsl5QE", "75": "2DmyvvhgURXBo3qH", "76": "4yziHD7vm2eMpbFZ", "77": "6xbePFwsmXo1AuUc", "78": "jU2wqflmqgLQ38G0", "79": "tgnXOQ2FUV3a1tGh", "80": "2K2RMFVx1bEbc9A7", "81": "Brz5VpZRalTCqWDW", "82": "sMIDxyRJbtZ754nQ", "83": "oqakHdWd986fiQ0t", "84": "b6i7zKr8ecYHeWgI", "85": "YCgnWui9OAb6r7u2", "86": "aDQyl0VBA7hcMYhy", "87": "VuUAdceBBmIKuAUk", "88": "EHYBV7OzLY5cjvOV", "89": "So9HRq6DqdLEgzXG", "90": "Ukv9HUSbp0rsWbBB", "91": "3rtPLdn4149Tp5GJ", "92": "Nw6OamoJWXpGUO3d", "93": "R2JxchrSxuM2IM96", "94": "ntvtSeJscLu0BpGO", "95": "cKUne8xKDJI7eQYv", "96": "hjvA6SPMvNDeoASx", "97": "WItM09DSPIqjV9AJ", "98": "RnMbfTmuVVoXxn8o", "99": "4cexHjeDVcKyuYoL", "100": "W50UZUaLeELPH3jT", "101": "8km1fhiu6t4wjyrw", "102": "ylbHpYB6ZKcLiANM", "103": "8kFxp4dX9cYspuWP", "104": "SnW3YnwnnZwaxJ7l", "105": "hy0nwRWFX0ioeiaY", "106": "ryTwd7zPLJMcqeip", "107": "skceo0txo8tL5dU0", "108": "EWaZxEgq3oQayebd", "109": "krrDSfJeLbY8IxE4", "110": "GFmLgF5LFyVyuz8w", "111": "vvIFQfNMXqCR1Scd", "112": "2XoE96xYjdYU3yFX", "113": "x0Ey2OGA63k8fYD3", "114": "TPbKYl8JjLXNjWVk", "115": "aHUcdOl5ewUn2t0n", "116": "o8nF2elUlRw9e5fK", "117": "TUszHwhNh3KXaS39", "118": "alIQ1TyO33YMOVpz", "119": "IzjRDoFVEDnc3S2h", "120": "rKP5lJCRWvMGT7xQ", "121": "QP90rJQzMxxlDvU2", "122": "NWJDhxQzlBBoTwX2", "123": "8CRvDf8XkeLHTQiS", "124": "GS27g6pSK0MCuEr9"}
4 changes: 2 additions & 2 deletions deploy/shell/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ def create_service(name):
for i in range(shell_count):
name = f"shell-{i}"

password = passwords.get(name)
password = passwords.get(i)
if password is None:
password = generate_password()

passwords[name] = password
passwords[i] = password

deployment = create_pod(name, password)
service = create_service(name)
Expand Down
Loading

0 comments on commit df5f3ad

Please sign in to comment.