http://www.perlmonks.org?node_id=605551

perlmaster has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: assemble/disassemble network packets
by merlyn (Sage) on Mar 19, 2007 at 19:16 UTC
    How can i make my own assemble/disassemble network packets in perl and would that be raw socket. I know there a tool like netpacket out there but i want to make my own tools.
    Within a few minutes of this post, "whiteghost" on Freenode #perl asked:
    <whiteghost> How would i assemble/disassemble network packets in perl?
    The writing style is very similar (historically in both cases), so I can't say for certain that this is the same person, but I'd bet a month's rent on it. The thing is, from this other IRC comment he made:
    <whiteghost> i ry to thng of a tool i can make for exploit bugs in win +dows but can't think of one right now.
    we've all pretty much written him off as a "cracker-wannabe".

    So, do what you wish in response to this post, but know that there's a growing group of folks that won't help him.


    update: I have strong reason to believe that packet is the same person as well, based on timing of messages here, in email, and on IRC.

      Maybe he and freak should get together and swap l33t h4x0R 1nf0z.

Re: assemble/disassemble network packets
by kyle (Abbot) on Mar 19, 2007 at 19:15 UTC

    What problem are you actually trying to solve (why do you want to deal with network packets this way)? (I'm asking because this looks like a XY Problem.) What have you tried already?

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: assemble/disassemble network packets
by ambrus (Abbot) on Mar 19, 2007 at 21:07 UTC

    Use unpack and getsockopt. Read kernel manpages like getsockopt(2), socket(7), ip(7), raw(7), tcp(7), udp(7) and internet RFCs like RFC 793.

      Use Net::RawIP to send packets. Use Net::Pcap to get the replies. Use NetPacket::* to disassemble the replies. Read up on the perldoc of each.
Re: assemble/disassemble network packets
by Anonymous Monk on Feb 03, 2014 at 09:54 UTC