Class: FIDIUS::PacketLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/msf-plugins/evasiondb.rb

Defined Under Namespace

Classes: MySocketEventHandler

Class Method Summary collapse

Class Method Details

.cleanupObject



314
315
316
# File 'lib/msf-plugins/evasiondb.rb', line 314

def self.cleanup
 Rex::Socket::Comm::Local.deregister_event_handler($eh)
end

.init_with_framework(framework) ⇒ Object



309
310
311
312
# File 'lib/msf-plugins/evasiondb.rb', line 309

def self.init_with_framework(framework)
 $eh = MySocketEventHandler.new
 Rex::Socket::Comm::Local.register_event_handler($eh)
end

.inspect_socket(socket) ⇒ Object



287
288
289
# File 'lib/msf-plugins/evasiondb.rb', line 287

def self.inspect_socket(socket)
  "#{socket.localhost}:#{socket.localport} -> #{socket.peerhost}:#{socket.peerport}"
end

.log_packet(socket, data, module_instance = nil) ⇒ Object



279
280
281
282
283
284
285
# File 'lib/msf-plugins/evasiondb.rb', line 279

def self.log_packet(socket,data,module_instance=nil)
  begin
    $block.call module_instance, data, socket
  rescue
    #PUT HERE IS RESPONSIBLE FOR NO SESSION ? $stdout.puts "ERROR #{$!}:#{$!.backtract}"
  end
end

.on_log(&block) ⇒ Object



275
276
277
# File 'lib/msf-plugins/evasiondb.rb', line 275

def self.on_log(&block)
  $block = block
end