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