More error cleanup
parent
d40e39b71b
commit
1468a904a7
|
@ -211,7 +211,10 @@ protected
|
||||||
end
|
end
|
||||||
|
|
||||||
# Build a user-friendly error message
|
# Build a user-friendly error message
|
||||||
|
msg = "#{e}"
|
||||||
|
unless e.class == Msf::Exploit::Failed
|
||||||
msg = "#{e.class} #{e}"
|
msg = "#{e.class} #{e}"
|
||||||
|
end
|
||||||
|
|
||||||
exploit.error = e
|
exploit.error = e
|
||||||
|
|
||||||
|
@ -233,13 +236,13 @@ protected
|
||||||
|
|
||||||
when Rex::ConnectionError
|
when Rex::ConnectionError
|
||||||
exploit.fail_reason = Msf::Exploit::Failure::Unreachable
|
exploit.fail_reason = Msf::Exploit::Failure::Unreachable
|
||||||
exploit.print_error("Exploit failed: [#{exploit.fail_reason}] #{msg}")
|
exploit.print_error("Exploit failed [#{exploit.fail_reason}]: #{msg}")
|
||||||
elog("Exploit failed (#{exploit.refname}): #{msg}", 'core', LEV_0)
|
elog("Exploit failed (#{exploit.refname}): #{msg}", 'core', LEV_0)
|
||||||
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
|
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
|
||||||
|
|
||||||
when Timeout::Error
|
when Timeout::Error
|
||||||
exploit.fail_reason = Msf::Exploit::Failure::TimeoutExpired
|
exploit.fail_reason = Msf::Exploit::Failure::TimeoutExpired
|
||||||
exploit.print_error("Exploit failed: [#{exploit.fail_reason}] #{msg}")
|
exploit.print_error("Exploit failed [#{exploit.fail_reason}]: #{msg}")
|
||||||
elog("Exploit failed (#{exploit.refname}): #{msg}", 'core', LEV_0)
|
elog("Exploit failed (#{exploit.refname}): #{msg}", 'core', LEV_0)
|
||||||
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
|
dlog("Call stack:\n#{e.backtrace.join("\n")}", 'core', LEV_3)
|
||||||
else
|
else
|
||||||
|
@ -268,7 +271,7 @@ protected
|
||||||
if exploit.fail_reason == Msf::Exploit::Failure::Unknown
|
if exploit.fail_reason == Msf::Exploit::Failure::Unknown
|
||||||
exploit.print_error("Exploit failed: #{msg}")
|
exploit.print_error("Exploit failed: #{msg}")
|
||||||
else
|
else
|
||||||
exploit.print_error("Exploit failed: [#{exploit.fail_reason}] #{msg}")
|
exploit.print_error("Exploit failed [#{exploit.fail_reason}]: #{msg}")
|
||||||
end
|
end
|
||||||
|
|
||||||
elog("Exploit failed (#{exploit.refname}): #{msg}", 'core', LEV_0)
|
elog("Exploit failed (#{exploit.refname}): #{msg}", 'core', LEV_0)
|
||||||
|
|
Loading…
Reference in New Issue