2014-12-29 21:07:37 +00:00
|
|
|
|
|
|
|
===============================
|
2014-12-18 15:48:20 +00:00
|
|
|
dpkt
|
2014-12-29 21:07:37 +00:00
|
|
|
===============================
|
|
|
|
|
|
|
|
fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols
|
|
|
|
|
2014-12-29 21:38:14 +00:00
|
|
|
| |docs| |travis| |coveralls| |landscape| |version|
|
|
|
|
| |downloads| |wheel| |supported-versions| |supported-implementations|
|
2014-12-29 21:07:37 +00:00
|
|
|
|
|
|
|
.. |docs| image:: https://readthedocs.org/projects/dpkt/badge/?style=flat
|
|
|
|
:target: https://readthedocs.org/projects/dpkt
|
|
|
|
:alt: Documentation Status
|
|
|
|
|
|
|
|
.. |travis| image:: http://img.shields.io/travis/brifordwylie/dpkt/master.png?style=flat
|
|
|
|
:alt: Travis-CI Build Status
|
|
|
|
:target: https://travis-ci.org/brifordwylie/dpkt
|
|
|
|
|
|
|
|
.. |coveralls| image:: http://img.shields.io/coveralls/brifordwylie/dpkt/master.png?style=flat
|
|
|
|
:alt: Coverage Status
|
|
|
|
:target: https://coveralls.io/r/brifordwylie/dpkt
|
|
|
|
|
|
|
|
.. |landscape| image:: https://landscape.io/github/brifordwylie/dpkt/master/landscape.svg?style=flat
|
|
|
|
:target: https://landscape.io/github/brifordwylie/dpkt/master
|
|
|
|
:alt: Code Quality Status
|
|
|
|
|
|
|
|
.. |version| image:: http://img.shields.io/pypi/v/dpkt.png?style=flat
|
|
|
|
:alt: PyPI Package latest release
|
|
|
|
:target: https://pypi.python.org/pypi/dpkt
|
|
|
|
|
|
|
|
.. |downloads| image:: http://img.shields.io/pypi/dm/dpkt.png?style=flat
|
|
|
|
:alt: PyPI Package monthly downloads
|
|
|
|
:target: https://pypi.python.org/pypi/dpkt
|
|
|
|
|
|
|
|
.. |wheel| image:: https://pypip.in/wheel/dpkt/badge.png?style=flat
|
|
|
|
:alt: PyPI Wheel
|
|
|
|
:target: https://pypi.python.org/pypi/dpkt
|
|
|
|
|
|
|
|
.. |supported-versions| image:: https://pypip.in/py_versions/dpkt/badge.png?style=flat
|
|
|
|
:alt: Supported versions
|
|
|
|
:target: https://pypi.python.org/pypi/dpkt
|
|
|
|
|
|
|
|
.. |supported-implementations| image:: https://pypip.in/implementation/dpkt/badge.png?style=flat
|
2014-12-29 21:38:14 +00:00
|
|
|
:alt: Supported implementations
|
2014-12-29 21:07:37 +00:00
|
|
|
:target: https://pypi.python.org/pypi/dpkt
|
|
|
|
|
|
|
|
Installation
|
|
|
|
============
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
pip install dpkt
|
|
|
|
|
|
|
|
Documentation
|
|
|
|
=============
|
|
|
|
|
|
|
|
https://dpkt.readthedocs.org/
|
|
|
|
|
|
|
|
Development
|
|
|
|
===========
|
|
|
|
|
|
|
|
To run the all tests run::
|
|
|
|
|
|
|
|
tox
|
|
|
|
|
2014-12-18 15:48:20 +00:00
|
|
|
|
|
|
|
Deviations from upstream
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
This code is based on `dpkt code <https://code.google.com/p/dpkt/>`__ lead by Dug Song.
|
|
|
|
|
|
|
|
At this point, this is not the exact `upstream
|
|
|
|
version <https://code.google.com/p/dpkt/>`__. If you are looking for the
|
|
|
|
latest stock dpkt, please get it from the above link.
|
|
|
|
|
|
|
|
Almost all of the upstream changes are pulled. However, some modules are
|
|
|
|
not. Here is a list of the changes:
|
|
|
|
|
|
|
|
- `dpkt/dpkt.py <https://github.com/kbandla/dpkt/commit/336fe02b0e2f00b382d91cd42558a69eec16d6c7>`__:
|
|
|
|
decouple dnet from dpkt
|
|
|
|
- `dpkt/dns.py <https://github.com/kbandla/dpkt/commit/2bf3cde213144391fd90488d12f9ccce51b5fbca>`__
|
|
|
|
: parse some more DNS flags
|
|
|
|
|
|
|
|
Examples
|
|
|
|
--------
|
|
|
|
|
|
|
|
[@jonoberheide's](https://twitter.com/jonoberheide) old examples still
|
|
|
|
apply:
|
|
|
|
|
|
|
|
- `dpkt Tutorial #1: ICMP
|
|
|
|
Echo <https://jon.oberheide.org/blog/2008/08/25/dpkt-tutorial-1-icmp-echo/>`__
|
|
|
|
- `dpkt Tutorial #2: Parsing a PCAP
|
|
|
|
File <https://jon.oberheide.org/blog/2008/10/15/dpkt-tutorial-2-parsing-a-pcap-file/>`__
|
|
|
|
- `dpkt Tutorial #3: dns
|
|
|
|
spoofing <https://jon.oberheide.org/blog/2008/12/20/dpkt-tutorial-3-dns-spoofing/>`__
|
|
|
|
- `dpkt Tutorial #4: AS Paths from
|
|
|
|
MRT/BGP <https://jon.oberheide.org/blog/2009/03/25/dpkt-tutorial-4-as-paths-from-mrt-bgp/>`__
|
|
|
|
|
|
|
|
`Jeff Silverman <https://github.com/jeffsilverm>`__ has some
|
|
|
|
`code <https://github.com/jeffsilverm/dpkt_doc>`__ and
|
|
|
|
`documentation <http://www.commercialventvac.com/dpkt.html>`__.
|
|
|
|
|
|
|
|
LICENSE
|
|
|
|
-------
|
|
|
|
|
|
|
|
BSD 3-Clause License, as the upstream project
|