Merge branch 'feature/hd-wfsdelay'

bug/bundler_fix
David Maloney 2015-09-17 13:09:37 -05:00
commit 8528a10156
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
3 changed files with 24 additions and 3 deletions

View File

@ -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.

View File

@ -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
##

View File

@ -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
#