Class: Msf::Plugin::SocketLogger
- Inherits:
-
Msf::Plugin
- Object
- Msf::Plugin
- Msf::Plugin::SocketLogger
- Defined in:
- plugins/socket_logger.rb
Overview
This class hooks all sockets created by a running exploit
Defined Under Namespace
Classes: MySocketEventHandler
Instance Attribute Summary
Attributes inherited from Msf::Plugin
Attributes included from Framework::Offspring
Instance Method Summary collapse
- #cleanup ⇒ Object
- #desc ⇒ Object
-
#initialize(framework, opts) ⇒ SocketLogger
constructor
A new instance of SocketLogger.
- #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) ⇒ SocketLogger
Returns a new instance of SocketLogger.
36 37 38 39 40 41 42 43 |
# File 'plugins/socket_logger.rb', line 36 def initialize(framework, opts) log_path = opts['path'] || Msf::Config.log_directory log_prefix = opts['prefix'] || 'socket_' super @eh = MySocketEventHandler.new(log_path, log_prefix) Rex::Socket::Comm::Local.register_event_handler(@eh) end |
Instance Method Details
#cleanup ⇒ Object
45 46 47 |
# File 'plugins/socket_logger.rb', line 45 def cleanup Rex::Socket::Comm::Local.deregister_event_handler(@eh) end |
#desc ⇒ Object
53 54 55 |
# File 'plugins/socket_logger.rb', line 53 def desc 'Log socket operations to a directory as individual files' end |
#name ⇒ Object
49 50 51 |
# File 'plugins/socket_logger.rb', line 49 def name 'socket_logger' end |