Class: Msf::Plugin::EventTester

Inherits:
Msf::Plugin show all
Defined in:
plugins/event_tester.rb

Defined Under Namespace

Classes: Subscriber

Instance Attribute Summary

Attributes inherited from Msf::Plugin

#opts

Attributes included from Framework::Offspring

#framework

Instance Method Summary collapse

Methods inherited from Msf::Plugin

#add_console_dispatcher, create, #desc, #flush, #input, #output, #print, #print_error, #print_good, #print_line, #print_status, #print_warning, #remove_console_dispatcher

Constructor Details

#initialize(framework, opts) ⇒ EventTester

Returns a new instance of EventTester.


21
22
23
24
25
26
27
28
29
30
# File 'plugins/event_tester.rb', line 21

def initialize(framework, opts)
  super
  @subscriber = Subscriber.new
  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

Instance Method Details

#cleanupObject


31
32
33
34
35
36
37
38
# File 'plugins/event_tester.rb', line 31

def cleanup
  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

#nameObject


19
# File 'plugins/event_tester.rb', line 19

def name; "event_tester"; end