EvilZone

Programming and Scripting => Scripting Languages => : ZeroBoy April 02, 2014, 10:02:21 PM

: [Python] Sniffy - A Simple Network Sniffer
: ZeroBoy April 02, 2014, 10:02:21 PM
This is a simple network sniffer that sniffs packets at the Network Layer (IP Layer), parse it and displays the IP Header informations. It also do a hex and ASCII dump of the data sniffed.

The "ip" class has two methods:
[1] extract(): this method extracts the IP header elements and stores them in a list
[2] parse(): used to parse the IP header elements through an sqlite database that contains descriptions of the IP Header elements (e.g: protocol, precedence, ...)

Screenshot of a DNS response captured by Sniffy.py:
(http://3.bp.blogspot.com/-nH6YGr2m7Rw/Uy4FEF_1tuI/AAAAAAAAADM/8uW0EISFNyM/s1600/screenshot.png)

Source code is found here: Sniffy.py (https://github.com/offensive-python/Sniffy/blob/master/Sniffy.py)
The database can be downloaded from here: ip.sqlite (http://ge.tt/22p4aXS1/v/0)