Handle multiple exceptions

bug/bundler_fix
sinn3r 2014-02-07 12:23:10 -06:00
parent 40188e1eda
commit 9c76e7fb00
1 changed files with 9 additions and 3 deletions

View File

@ -45,9 +45,15 @@ class Metasploit3 < Msf::Post
if q.nil? or q[:results].empty? if q.nil? or q[:results].empty?
return return
end end
rescue RuntimeError => e rescue ::Exception => e
print_error(e.message) if e.kind_of?(RuntimeError) or e.kind_of?(RequestError)
return # Can't bind or in a network w/ limited accounts
print_error(e.message)
return
else
# Unexpected, raise it
raise $1
end
end end
# Results table holds raw string data # Results table holds raw string data