more error handling
parent
7b52bcb657
commit
3a73b40a1e
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue