From c07f842c75bcd7e1097c61e55a919c1554a6f7c5 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Fri, 5 Nov 2021 15:34:09 +0200 Subject: [PATCH] UI: small style fixes in local_windows_powershell.js --- .../RunMonkeyPage/commands/local_windows_powershell.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 da5d7c6e7..5c7d5c9a6 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 @@ -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}`; }