reassembling http packets with perl and parsing it
Posted
by
johnny2
on Stack Overflow
See other posts from Stack Overflow
or by johnny2
Published on 2011-01-16T20:48:40Z
Indexed on
2011/01/16
20:53 UTC
Read the original article
Hit count: 270
I am using net::pcap module to capture packets with this filter:
dst $my_host and dst port 80
inside the net::pcap::loop i use the below callback function:
net::pcap::loop($pcap_t,-1,\my_callback,'')
where my_callback look like this :
my_callback {
my ($user_data, $header, $packet) = @_;
# Strip ethernet IP and TCP
my $ether_data = NetPacket::Ethernet::strip($packet);
my $ip = NetPacket::IP->decode($ether_data);
my $tcp = NetPacket::TCP->decode($ip->{'data'});
}
could someone help me how can i assemble the http packets to one packet and extract its header .
© Stack Overflow or respective owner