more error handling

bug/bundler_fix
Christian Mehlmauer 2014-12-29 00:39:00 +01:00
parent 7b52bcb657
commit 3a73b40a1e
No known key found for this signature in database
GPG Key ID: BCFF4FA966BC32C7
1 changed files with 9 additions and 4 deletions

View File

@ -271,14 +271,20 @@ protected
exploit.fail_reason = Msf::Exploit::Failure::Unknown
end
elog("Exploit failed (#{exploit.refname}): #{msg}", 'core', LEV_0)
if exploit.fail_reason == Msf::Exploit::Failure::Unknown
exploit.print_error("Exploit failed: #{msg}")
exploit.print_error("Call stack:")
e.backtrace.each do |line|
break if line =~ /lib.msf.base.core.exploit_driver.rb/
exploit.print_error(" #{line}")
end
elog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_0)
else
exploit.print_error("Exploit failed [#{exploit.fail_reason}]: #{msg}")
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
end
elog("Exploit failed (#{exploit.refname}): #{msg}", 'core', LEV_0)
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
end
# Record the error to various places
@ -329,4 +335,3 @@ protected
end
end