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, #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.



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

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



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

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

#descObject



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

def desc
  'Internal test tool used to verify the internal framework event subscriber logic works'
end

#nameObject



14
15
16
# File 'plugins/event_tester.rb', line 14

def name
  'event_tester'
end