Handle non-failure module exits as well
parent
3d4449c1e7
commit
a7d1a61af2
|
@ -204,6 +204,8 @@ protected
|
|||
# Launch the exploit
|
||||
exploit.exploit
|
||||
|
||||
|
||||
|
||||
rescue ::Exception => e
|
||||
|
||||
if [::RuntimeError, ::Interrupt].include?(e.class)
|
||||
|
@ -254,7 +256,7 @@ protected
|
|||
exploit.fail_reason = Msf::Exploit::Failure::NoAccess
|
||||
when /connection reset/i
|
||||
exploit.fail_reason = Msf::Exploit::Failure::Disconnected
|
||||
when /connection timed out|SSL_connect|unreachable/i
|
||||
when /connection timed out|SSL_connect|unreachable|connection was refused/i
|
||||
exploit.fail_reason = Msf::Exploit::Failure::Unreachable
|
||||
when /unable.*target/i
|
||||
exploit.fail_reason = Msf::Exploit::Failure::NoTarget
|
||||
|
@ -290,6 +292,7 @@ protected
|
|||
# exploit.
|
||||
return if not delay
|
||||
|
||||
|
||||
if (force_wait_for_session == true) or
|
||||
(exploit.passive? == false and exploit.handler_enabled?)
|
||||
begin
|
||||
|
@ -301,12 +304,11 @@ protected
|
|||
|
||||
return self.session if self.session
|
||||
|
||||
unless exploit.fail_reason
|
||||
if exploit.fail_reason == Msf::Exploit::Failure::None
|
||||
exploit.fail_reason = Msf::Exploit::Failure::PayloadFailed
|
||||
exploit.fail_detail = "No session created"
|
||||
exploit.report_failure
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue