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}; `
|
+ `-o monkey-linux-${bitText}; `
|
||||||
+ `chmod +x monkey-linux-${bitText}; `
|
+ `chmod +x monkey-linux-${bitText}; `
|
||||||
+ `./monkey-linux-${bitText} m0nk3y -s ${ip}:5000;`;
|
+ `./monkey-linux-${bitText} m0nk3y -s ${ip}:5000;`;
|
||||||
if (username != '')
|
|
||||||
|
if (username != '') {
|
||||||
command = `su - ${username} -c "${command}"`;
|
command = `su - ${username} -c "${command}"`;
|
||||||
return command;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return command;
|
||||||
|
}
|
||||||
|
|
|
@ -7,7 +7,10 @@ export default function generateLocalLinuxWget(ip, osType, username) {
|
||||||
+ `monkey-linux-${bitText}; `
|
+ `monkey-linux-${bitText}; `
|
||||||
+ `chmod +x monkey-linux-${bitText}; `
|
+ `chmod +x monkey-linux-${bitText}; `
|
||||||
+ `./monkey-linux-${bitText} m0nk3y -s ${ip}:5000`;
|
+ `./monkey-linux-${bitText} m0nk3y -s ${ip}:5000`;
|
||||||
if (username != '')
|
|
||||||
|
if (username != '') {
|
||||||
command = `su - ${username} -c "${command}"`;
|
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'); `
|
+ `monkey-windows-${bitText}.exe','.\\monkey.exe'); `
|
||||||
+ `;Start-Process -FilePath '.\\monkey.exe' -ArgumentList 'm0nk3y -s ${ip}:5000';`;
|
+ `;Start-Process -FilePath '.\\monkey.exe' -ArgumentList 'm0nk3y -s ${ip}:5000';`;
|
||||||
|
|
||||||
if (username != '')
|
if (username != '') {
|
||||||
command = `runas /user:${username} "cmd /K ${command}"`;
|
command = `runas /user:${username} "cmd /K ${command}"`;
|
||||||
|
}
|
||||||
|
|
||||||
return 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/ `
|
+ `(New-Object System.Net.WebClient).DownloadFile('https://${ip}:5000/api/monkey/download/ `
|
||||||
+ `monkey-windows-${bitText}.exe','.\\monkey.exe'); `
|
+ `monkey-windows-${bitText}.exe','.\\monkey.exe'); `
|
||||||
+ `;Start-Process -FilePath '.\\monkey.exe' -ArgumentList 'm0nk3y -s ${ip}:5000';`;
|
+ `;Start-Process -FilePath '.\\monkey.exe' -ArgumentList 'm0nk3y -s ${ip}:5000';`;
|
||||||
if (username != '')
|
|
||||||
|
if (username != '') {
|
||||||
command = `Start-Process powershell.exe -ArgumentList "-noexit ${command}" -Credential ${username}`;
|
command = `Start-Process powershell.exe -ArgumentList "-noexit ${command}" -Credential ${username}`;
|
||||||
|
}
|
||||||
|
|
||||||
return command;
|
return command;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue