Minor code changes

This commit is contained in:
Shreya 2021-01-08 15:15:15 +05:30
parent 22d9f70374
commit 55dae3f29d
4 changed files with 33 additions and 22 deletions

View File

@ -7,7 +7,10 @@ export default function generateLocalLinuxCurl(ip, osType, username) {
+ `-o monkey-linux-${bitText}; `
+ `chmod +x monkey-linux-${bitText}; `
+ `./monkey-linux-${bitText} m0nk3y -s ${ip}:5000;`;
if (username != '')
if (username != '') {
command = `su - ${username} -c "${command}"`;
return command;
}
return command;
}

View File

@ -7,7 +7,10 @@ export default function generateLocalLinuxWget(ip, osType, username) {
+ `monkey-linux-${bitText}; `
+ `chmod +x monkey-linux-${bitText}; `
+ `./monkey-linux-${bitText} m0nk3y -s ${ip}:5000`;
if (username != '')
if (username != '') {
command = `su - ${username} -c "${command}"`;
return command;
}
return command;
}

View File

@ -8,7 +8,9 @@ export default function generateLocalWindowsCmd(ip, osType, username) {
+ `monkey-windows-${bitText}.exe','.\\monkey.exe'); `
+ `;Start-Process -FilePath '.\\monkey.exe' -ArgumentList 'm0nk3y -s ${ip}:5000';`;
if (username != '')
if (username != '') {
command = `runas /user:${username} "cmd /K ${command}"`;
}
return command;
}

View File

@ -7,7 +7,10 @@ export default function generateLocalWindowsPowershell(ip, osType, username) {
+ `(New-Object System.Net.WebClient).DownloadFile('https://${ip}:5000/api/monkey/download/ `
+ `monkey-windows-${bitText}.exe','.\\monkey.exe'); `
+ `;Start-Process -FilePath '.\\monkey.exe' -ArgumentList 'm0nk3y -s ${ip}:5000';`;
if (username != '')
if (username != '') {
command = `Start-Process powershell.exe -ArgumentList "-noexit ${command}" -Credential ${username}`;
}
return command;
}