Update main.js

pull/1/merge
Elijah Bansley 2018-05-17 08:24:54 -05:00 committed by GitHub
parent 969165a779
commit f8922c89ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -110,6 +110,7 @@ document.getElementById("goButton").addEventListener("click", async () => {
device = await navigator.usb.requestDevice({ filters: [{ vendorId: 0x0955 }] });
const payloadType = document.forms.mainForm.payload.value;
const shouldDebug = document.forms.mainForm.debug.value;
logOutput(`Preparing to launch ${payloadType}...`);
let payload;
@ -123,9 +124,13 @@ document.getElementById("goButton").addEventListener("click", async () => {
}
payload = new Uint8Array(await readFileAsArrayBuffer(file));
} else {
console.log("how?");
logOutput("You're trying to load a payload type that doesn't exist.");
return;
}
if(shouldDebug == "shouldDebug") {
logOutput(payload);
}
launchPayload(payload);
});