Land #4375
commit
6b117d7858
|
@ -176,7 +176,7 @@ class EventDispatcher
|
|||
found = false
|
||||
case event
|
||||
when "on"
|
||||
if respond_to?(subscribers)
|
||||
if respond_to?(subscribers, true)
|
||||
found = true
|
||||
self.send(subscribers).each do |sub|
|
||||
next if not sub.respond_to?(name)
|
||||
|
@ -221,11 +221,11 @@ protected
|
|||
array.delete(subscriber)
|
||||
end
|
||||
|
||||
attr_accessor :general_event_subscribers # :nodoc:
|
||||
attr_accessor :custom_event_subscribers # :nodoc:
|
||||
attr_accessor :exploit_event_subscribers # :nodoc:
|
||||
attr_accessor :session_event_subscribers # :nodoc:
|
||||
attr_accessor :db_event_subscribers # :nodoc:
|
||||
attr_accessor :exploit_event_subscribers # :nodoc:
|
||||
attr_accessor :general_event_subscribers # :nodoc:
|
||||
attr_accessor :session_event_subscribers # :nodoc:
|
||||
attr_accessor :ui_event_subscribers # :nodoc:
|
||||
|
||||
end
|
||||
|
|
|
@ -449,7 +449,6 @@ class Payload < Msf::Module
|
|||
#
|
||||
def on_session(session)
|
||||
|
||||
|
||||
# If this payload is associated with an exploit, inform the exploit
|
||||
# that a session has been created and potentially shut down any
|
||||
# open sockets. This allows active exploits to continue hammering
|
||||
|
|
|
@ -21,17 +21,19 @@ class Plugin::EventTester < Msf::Plugin
|
|||
def initialize(framework, opts)
|
||||
super
|
||||
@subscriber = Subscriber.new
|
||||
framework.events.add_exploit_subscriber(@subscriber)
|
||||
framework.events.add_session_subscriber(@subscriber)
|
||||
framework.events.add_general_subscriber(@subscriber)
|
||||
framework.events.add_custom_subscriber(@subscriber)
|
||||
framework.events.add_db_subscriber(@subscriber)
|
||||
framework.events.add_exploit_subscriber(@subscriber)
|
||||
framework.events.add_general_subscriber(@subscriber)
|
||||
framework.events.add_session_subscriber(@subscriber)
|
||||
framework.events.add_ui_subscriber(@subscriber)
|
||||
end
|
||||
def cleanup
|
||||
framework.events.remove_exploit_subscriber(@subscriber)
|
||||
framework.events.remove_session_subscriber(@subscriber)
|
||||
framework.events.remove_general_subscriber(@subscriber)
|
||||
framework.events.remove_custom_subscriber(@subscriber)
|
||||
framework.events.remove_db_subscriber(@subscriber)
|
||||
framework.events.remove_exploit_subscriber(@subscriber)
|
||||
framework.events.remove_general_subscriber(@subscriber)
|
||||
framework.events.remove_session_subscriber(@subscriber)
|
||||
framework.events.remove_ui_subscriber(@subscriber)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue