I'm just getting back in to perl and wrote a little script with Net::RawIP. I have not compared RawIP to the other modules mentioned, but after I got through what for me was some confusing documentaion and undocumented examples, I was fine and it worked well. I needed the ability to both send and receive IP packets, thus Net::Pcap was not an option.

If your class is about security of communications then I'd strongly suggest that you use RawIP. Much more can be done to manipulate communications and break security if one can introduce as well as observe traffic in Man-in-the-Middle scenarios. Even if that is not what your current assignment would require, you'd already have the experience working with RawIP for when you do need to inject or intercept and rewrite packets. It is probably obvious from my nym that I am working on doing that for SIP and the VoIP systems dependent on it.

If one is trying to use Net::RawIP, the example that is best to follow is the traceroute. I'm not even sure some of the others will work with recent versions of perl. I have a version of traceroute where I made detailed comments on what was supposed to be happening for my own understanding, please ask if you'd like a copy before I get it cleaned up enough to submit to the RawIP author.

Net::RawIP is not supported by Activestate on Windows and will require a C compiler to build. If anyone has built it and can share the binaries, please let me know. I will get to it someday, but if someone can beat me to it, it's one less thing to do.

HTH, Sip Phreak


In reply to Re: perl IP packet sniffer by sipphreak
in thread perl IP packet sniffer by gri6507

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.