Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Unpack and Network Packets

by mongre (Initiate)
on Dec 08, 2000 at 10:00 UTC ( #45700=perlquestion: print w/ replies, xml ) Need Help??
mongre has asked for the wisdom of the Perl Monks concerning the following question:

I am sniffing traffic with the Net::Pcap module and I am having a heck of a time figuring out how to turn the binary packed data into some usable (ie ip addresses, ports etc) Has anyone done this? I could sure use some tips or a code snippet, what I have found so far can get me the Hex for Ethernet Addresses but that is all I have been able to get... unpack (" H12 H12 H4 H*",$pkt) Thanks for any help you can provide.. Cheers Terrence

Comment on Unpack and Network Packets
Re: Unpack and Network Packets
by Anonymous Monk on Dec 08, 2000 at 12:57 UTC
    I was just playing with pcap recently myself, I found these helpful modules:

    Net::PcapUtils
    NetPacket::Ethernet
    NetPacket::IP
    NetPacket::TCP

    Hope they help, good luck.

Re: Unpack and Network Packets
by drip (Beadle) on Mar 27, 2008 at 05:58 UTC
    and if it is UPD packet:

    NetPacket::UDP

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://45700]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-11-27 17:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (186 votes), past polls