in reply to libpcap, netpacket and decoding http data

You will need to combine the TCP packets you're receiving to restore the TCP stream. I've done something like that with Sniffer::HTTP. Also note that "requesting" the same resource will not necessarily give you the same response.

  • Comment on Re: libpcap, netpacket and decoding http data

Replies are listed 'Best First'.
Re^2: libpcap, netpacket and decoding http data
by gk2010 (Initiate) on Mar 17, 2010 at 15:20 UTC
    i looked at that but i could not find a way to write the resulting data to disk. The when i read through the module I noticed there was a note explaining why. I need to dump the data to a file while i debug and write the app.

      You can write things to disk, but you will first accumulate the complete download in RAM. The module documentation says so.

        Am I looking at a different module or simply reading this document wrong. http://search.cpan.org/~corion/Sniffer-HTTP-0.19/lib/Sniffer/HTTP.pm "As the whole response data is accumulated in memory you should be aware of memory issues. If you want to write stuff directly to disk, you will need to submit patches to Sniffer::Connection::HTTP."