forked from p15670423/monkey
UI: small style fixes in local_windows_powershell.js
This commit is contained in:
parent
7e1e5917cb
commit
c07f842c75
|
@ -1,19 +1,19 @@
|
|||
import {OS_TYPES} from '../utils/OsTypes';
|
||||
|
||||
|
||||
export function getAgentDownloadCommand(ip, osType) {
|
||||
function getAgentDownloadCommand(ip, osType) {
|
||||
let bitText = osType === OS_TYPES.WINDOWS_32 ? '32' : '64';
|
||||
return `$execCmd = @"\r\n`
|
||||
+ `[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {\`$true};`
|
||||
+ `(New-Object System.Net.WebClient).DownloadFile('https://${ip}:5000/api/monkey/download/monkey-windows-${bitText}.exe',`
|
||||
+ `"""$env:TEMP\\monkey.exe""");Start-Process -FilePath '$env:TEMP\\monkey.exe' -ArgumentList 'm0nk3y -s ${ip}:5000';`
|
||||
+ `\r\n"@; \r\n`
|
||||
+ `Start-Process -FilePath powershell.exe -ArgumentList $execCmd`
|
||||
+ `Start-Process -FilePath powershell.exe -ArgumentList $execCmd`;
|
||||
}
|
||||
|
||||
export default function generateLocalWindowsPowershell(ip, osType, username) {
|
||||
let command = getAgentDownloadCommand(ip, osType)
|
||||
if (username != '') {
|
||||
if (username !== '') {
|
||||
command += ` -Credential ${username}`;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue