Minor code changes
This commit is contained in:
parent
22d9f70374
commit
55dae3f29d
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue