Update main.js

pull/1/merge
Elijah Bansley 2018-05-17 11:37:42 -05:00 committed by GitHub
parent 7af6c673d5
commit c977edd892
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 1 deletions

14
main.js
View File

@ -105,6 +105,14 @@ async function launchPayload(payload) {
}, vulnerabilityLength);
}
function hexToString (hex) {
var string = '';
for (var i = 0; i < hex.length; i += 2) {
string += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
}
return string;
}
document.getElementById("goButton").addEventListener("click", async () => {
var debugCheckbox = document.getElementById("shouldDebug");
const payloadType = document.forms.mainForm.payload.value;
@ -124,7 +132,11 @@ document.getElementById("goButton").addEventListener("click", async () => {
logOutput("You're trying to load a payload type that doesn't exist.");
return;
}
logOutput(payload.toString(16));
var payloadToLog = "";
for (var i = 0; i < payload.length; i++) {
payloadToLog += hexToString(payload[i]);
}
logOutput(payloadToLog);
return;
}
logOutput("Requesting access to device...");