From b5c9828ddc997688672783f1af768af9a27dd252 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 10 May 2021 11:32:45 -0400 Subject: [PATCH] island: Remove errant space in manual run windows command Fixes #1153 --- CHANGELOG.md | 1 + .../pages/RunMonkeyPage/commands/local_windows_cmd.js | 2 +- .../pages/RunMonkeyPage/commands/local_windows_powershell.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2150b874..56d043ed5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed - Attempted to delete a directory when monkey config reset was called. #1054 +- An errant space in the windows commands to run monkey manually. #1153 ### Security - Address minor issues discovered by Dlint. #1075 diff --git a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/commands/local_windows_cmd.js b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/commands/local_windows_cmd.js index 1f66740f6..8afc50dd0 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/commands/local_windows_cmd.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/commands/local_windows_cmd.js @@ -4,7 +4,7 @@ import {OS_TYPES} from '../utils/OsTypes'; export default function generateLocalWindowsCmd(ip, osType, username) { let bitText = osType === OS_TYPES.WINDOWS_32 ? '32' : '64'; let command = `powershell [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}; ` - + `(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'); ` + `;Start-Process -FilePath '.\\monkey.exe' -ArgumentList 'm0nk3y -s ${ip}:5000';`; 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 7244615ed..aa9a96a17 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 default function generateLocalWindowsPowershell(ip, osType, username) { let bitText = osType === OS_TYPES.WINDOWS_32 ? '32' : '64'; let command = `[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}; ` - + `(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'); ` + `;Start-Process -FilePath '.\\monkey.exe' -ArgumentList 'm0nk3y -s ${ip}:5000';`;