Merge branch 'feature/hd-wfsdelay'
commit
8528a10156
|
@ -237,6 +237,9 @@ module Exploit
|
|||
|
||||
# Report the failure (and attempt) in the database
|
||||
self.report_failure
|
||||
|
||||
# Interrupt any session waiters in the handler
|
||||
self.interrupt_handler
|
||||
end
|
||||
#
|
||||
# Calls the class method.
|
||||
|
|
|
@ -1193,9 +1193,19 @@ class Exploit < Msf::Module
|
|||
# value can be one of the Handler::constants.
|
||||
#
|
||||
def handler(*args)
|
||||
return if not payload_instance
|
||||
return if not handler_enabled?
|
||||
return payload_instance.handler(*args)
|
||||
return unless payload_instance
|
||||
return unless handler_enabled?
|
||||
payload_instance.handler(*args)
|
||||
end
|
||||
|
||||
#
|
||||
# Break out of the session wait loop (WfsDelay)
|
||||
#
|
||||
def interrupt_handler
|
||||
return unless payload_instance
|
||||
return unless handler_enabled?
|
||||
return unless payload_instance.respond_to?(:interrupt_wait_for_session)
|
||||
payload_instance.interrupt_wait_for_session()
|
||||
end
|
||||
|
||||
##
|
||||
|
|
|
@ -162,6 +162,14 @@ module Handler
|
|||
return session
|
||||
end
|
||||
|
||||
#
|
||||
# Interrupts a wait_for_session call by notifying with a nil event
|
||||
#
|
||||
def interrupt_wait_for_session
|
||||
return unless session_waiter_event
|
||||
session_waiter_event.notify(nil)
|
||||
end
|
||||
|
||||
#
|
||||
# Set by the exploit module to configure handler
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue