creating RAW sockets

moijes12 moijes12 at gmail.com
Fri Mar 18 01:25:52 EDT 2011


On Mar 18, 6:20 am, Nobody <nob... at nowhere.com> wrote:
> On Wed, 16 Mar 2011 23:50:03 -0700, moijes12 wrote:
> > Now,please can someone guide(as in what should I read and NOT as in
> > give me the code) me in decoding the IP header of packets using python
> > 3.0.1.
>
> The "struct" module is the usual approach for decoding binary data
> structures. Fields which aren't whole bytes/words will need to
> be extracted manually using >> and &.
>
> In case you don't already have it, the layout of an IPv4 header can be
> found at:
>
>        http://en.wikipedia.org/wiki/IPv4#Header
>
> Remember that TCP/IP uses big-endian format.

thanks guys
Moijes



More information about the Python-list mailing list