diff --git a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunManually/LocalManualRunOptions.js b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunManually/LocalManualRunOptions.js index f0b139531..116ba5440 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunManually/LocalManualRunOptions.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunManually/LocalManualRunOptions.js @@ -2,7 +2,6 @@ import React, {useEffect, useState} from 'react'; import InlineSelection from '../../../ui-components/inline-selection/InlineSelection'; import DropdownSelect from '../../../ui-components/DropdownSelect'; import {OS_TYPES} from '../utils/OsTypes'; -import GenerateLocalWindowsCmd from '../commands/local_windows_cmd'; import GenerateLocalWindowsPowershell from '../commands/local_windows_powershell'; import GenerateLocalLinuxWget from '../commands/local_linux_wget'; import GenerateLocalLinuxCurl from '../commands/local_linux_curl'; @@ -50,8 +49,7 @@ const getContents = (props) => { function generateCommands() { if (osType === OS_TYPES.WINDOWS_64 || osType === OS_TYPES.WINDOWS_32) { - return [{type: 'CMD', command: GenerateLocalWindowsCmd(selectedIp, osType, customUsername)}, - {type: 'Powershell', command: GenerateLocalWindowsPowershell(selectedIp, osType, customUsername)}] + return [{type: 'Powershell', command: GenerateLocalWindowsPowershell(selectedIp, osType, customUsername)}] } else { return [{type: 'CURL', command: GenerateLocalLinuxCurl(selectedIp, osType, customUsername)}, {type: 'WGET', command: GenerateLocalLinuxWget(selectedIp, osType, customUsername)}] 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 deleted file mode 100644 index 8afc50dd0..000000000 --- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/commands/local_windows_cmd.js +++ /dev/null @@ -1,16 +0,0 @@ -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/` - + `monkey-windows-${bitText}.exe','.\\monkey.exe'); ` - + `;Start-Process -FilePath '.\\monkey.exe' -ArgumentList 'm0nk3y -s ${ip}:5000';`; - - if (username != '') { - command = `runas /user:${username} "cmd /K ${command}"`; - } - - return command; -}