Class: BetterCap::Parsers::Post

Inherits:
Base
  • Object
show all
Defined in:
lib/bettercap/sniffer/parsers/post.rb

Overview

HTTP POST requests parser.

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from BetterCap::Parsers::Base

Instance Method Details

#on_packet(pkt) ⇒ Object


19
20
21
22
23
24
# File 'lib/bettercap/sniffer/parsers/post.rb', line 19

def on_packet( pkt )
  s = pkt.to_s
  if s =~ /POST\s+[^\s]+\s+HTTP.+/
    StreamLogger.log_raw( pkt, "POST\n", pkt.payload )
  end
end