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.
44 45 46 47 48 49 50 51 |
# File 'plugins/socket_logger.rb', line 44 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
53 54 55 |
# File 'plugins/socket_logger.rb', line 53 def cleanup Rex::Socket::Comm::Local.deregister_event_handler(@eh) end |
#desc ⇒ Object
61 62 63 |
# File 'plugins/socket_logger.rb', line 61 def desc "Log socket operations to a directory as individual files" end |
#name ⇒ Object
57 58 59 |
# File 'plugins/socket_logger.rb', line 57 def name "socket_logger" end |