Class: Msf::Plugin::DB_Tracer
- Inherits:
-
Msf::Plugin
- Object
- Msf::Plugin
- Msf::Plugin::DB_Tracer
- Defined in:
- plugins/db_tracker.rb
Overview
This class hooks all socket calls and updates the database with data gathered from the connection parameters
Defined Under Namespace
Classes: DBTracerEventHandler
Instance Attribute Summary
Attributes inherited from Msf::Plugin
Attributes included from Framework::Offspring
Instance Method Summary collapse
- #cleanup ⇒ Object
- #desc ⇒ Object
-
#initialize(framework, opts) ⇒ DB_Tracer
constructor
A new instance of DB_Tracer.
- #name ⇒ Object
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) ⇒ DB_Tracer
Returns a new instance of DB_Tracer.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'plugins/db_tracker.rb', line 39 def initialize(framework, opts) super if !framework.db.active raise PluginLoadError, 'The database backend has not been initialized' end framework.plugins.each do |plugin| if plugin.instance_of?(Msf::Plugin::DB_Tracer) raise PluginLoadError, 'This plugin should not be loaded more than once' end end @eh = DBTracerEventHandler.new Rex::Socket::Comm::Local.register_event_handler(@eh) end |
Instance Method Details
#cleanup ⇒ Object
56 57 58 |
# File 'plugins/db_tracker.rb', line 56 def cleanup Rex::Socket::Comm::Local.deregister_event_handler(@eh) end |
#desc ⇒ Object
64 65 66 |
# File 'plugins/db_tracker.rb', line 64 def desc 'Monitors socket calls and updates the database backend' end |
#name ⇒ Object
60 61 62 |
# File 'plugins/db_tracker.rb', line 60 def name 'db_tracker' end |