Need to catch RequestError too

Because a meterpreter session may throw that
bug/bundler_fix
sinn3r 2013-09-20 17:13:35 -05:00
parent 2591be503b
commit 96364c78f8
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ class Metasploit3 < Msf::Exploit::Local
rescue Rex::TimeoutError rescue Rex::TimeoutError
vprint_status("#{server.ljust(16)} Timed out...") vprint_status("#{server.ljust(16)} Timed out...")
next next
rescue RuntimeError rescue RuntimeError, ::Rex::Post::Meterpreter::RequestError
print_error("Exception running payload: #{$!.class} : #{$!}") print_error("Exception running payload: #{$!.class} : #{$!}")
print_warning("#{server.ljust(16)} WARNING: May have failed to clean up!") print_warning("#{server.ljust(16)} WARNING: May have failed to clean up!")
print_warning("#{server.ljust(16)} Try a command like: sc \\\\#{server}\\ delete #{name}") print_warning("#{server.ljust(16)} Try a command like: sc \\\\#{server}\\ delete #{name}")