{ "info": { "author": "Mike Joblin", "author_email": "mike@tastymoss.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6", "Topic :: System :: Monitoring", "Topic :: System :: Networking", "Topic :: System :: Networking :: Monitoring" ], "description": "netdumplings\n============\n\nA framework for distributed network packet sniffing and processing.\n\nSee the `documentation`_ for more details, and the `netmomo`_ and `packscape`_\nsample Web applications (dumpling eaters) which use netdumplings as their\nback-end. Python 3.6 or higher is required.\n\nInstallation\n------------\n::\n\n pip install netdumplings\n\nDistributed packet sniffing?\n----------------------------\n\nnetdumplings allows you to run multiple packet sniffers on any number of hosts.\nThose sniffers -- called **dumpling kitchens** -- pass any sniffed network\npackets to your Python code for processing. Your Python code is implemented as\nclasses called **dumpling chefs** which use the network packets to generate\n**dumplings**. Dumpling contents are entirely up to you but they'll usually\ndescribe the information contained in the sniffed network packets.\n\nThe dumplings created by the dumpling chefs are sent from the dumpling kitchens\nto a single **dumpling hub**, which forwards them on to any connected\n**dumpling eaters** for display or for any other sort of processing or\nvisualization.\n\nThe **kitchens**, **chefs**, **dumplings**, **hub**, and **eaters**, are shown\nbelow. You write the bits in green (the chefs and eaters) and netdumplings\ndoes the rest:\n\n.. image:: docs/_static/overview.svg\n :align: center\n\nDumplings are sent between the kitchens, hub, and eaters, over WebSockets.\n\nWhat does a dumpling look like?\n-------------------------------\n\nDumplings are just JSON data. The following dumpling was created by a chef\nwhich makes a dumpling for every DNS lookup.\n\n.. code-block:: javascript\n\n {\n \"metadata\": {\n \"chef\": \"DNSLookupChef\",\n \"creation_time\": 1515990765.925951,\n \"driver\": \"packet\",\n \"kitchen\": \"default_kitchen\"\n\n },\n \"payload\": {\n \"lookup\": {\n \"hostname\": \"myspace.com\",\n \"when\": 1515990721.147\n }\n }\n }\n\nThe ``\"payload\"`` section is generated by the dumpling chef and the\n``\"metadata\"`` section is created automatically when the dumpling is sent to\nthe hub by the kitchen.\n\nExample dumpling chef\n---------------------\n\nThe following dumpling chef creates a dumpling for every DNS lookup (see the\nexample dumpling above).\n\n.. code-block:: python\n\n import time\n import netdumplings\n\n class DNSLookupChef(netdumplings.DumplingChef):\n def packet_handler(self, packet):\n # The incoming packet is a scapy packet object.\n # https://scapy.readthedocs.io\n\n # Ignore packets that we don't care about.\n if not packet.haslayer('DNS'):\n return\n\n # Determine the name of the host that was looked up.\n dns_query = packet.getlayer('DNS')\n query = dns_query.fields['qd']\n hostname = query.qname.decode('utf-8')\n\n # Generate a dumpling payload from the DNS lookup.\n dumpling_payload = {\n 'lookup': {\n 'hostname': hostname,\n 'when': time.time(),\n }\n }\n\n # The handler is returning a dict, which will be automatically\n # converted into a dumpling and sent to nd-hub, which will then\n # forward it on to all the eaters.\n return dumpling_payload\n\nExample dumpling eater\n----------------------\n\nThe following eater prints the payload of every dumpling sent from\n``nd-hub``.\n\n.. code-block:: python\n\n import json\n import netdumplings\n\n class PrinterEater(netdumplings.DumplingEater):\n async def on_connect(self, hub_uri, websocket):\n print(f'Connected to nd-hub at {hub_uri}')\n print('Waiting for dumplings...\\n')\n\n async def on_dumpling(self, dumpling):\n # The given dumpling is a netdumplings.Dumpling instance.\n dumpling_printable = json.dumps(dumpling.payload, indent=4)\n print(f'{dumpling_printable}\\n')\n\n\n def dumpling_printer():\n eater = PrinterEater()\n eater.run()\n\n\n if __name__ == '__main__':\n dumpling_printer()\n\nMore information\n----------------\n\nSee the `documentation`_ for more details.\n\n\n.. _documentation: http://netdumplings.readthedocs.io\n.. _netmomo: https://github.com/mjoblin/netmomo\n.. _packscape: https://github.com/mjoblin/packscape\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://pypi.python.org/pypi/netdumplings", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mjoblin/netdumplings", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "netdumplings", "package_url": "https://pypi.org/project/netdumplings/", "platform": "", "project_url": "https://pypi.org/project/netdumplings/", "project_urls": { "Download": "https://pypi.python.org/pypi/netdumplings", "Homepage": "https://github.com/mjoblin/netdumplings" }, "release_url": "https://pypi.org/project/netdumplings/0.4.0/", "requires_dist": [ "click (~=6.7)", "netifaces", "pygments", "scapy (~=2.4.2)", "termcolor", "websockets (~=7.0.0)", "flake8 ; extra == 'dev'", "mypy ; extra == 'dev'", "sphinx ; extra == 'dev'", "sphinx-autodoc-typehints ; extra == 'dev'", "asynctest ; extra == 'dev'", "pytest ; extra == 'dev'", "pytest-asyncio ; extra == 'dev'", "pytest-cov ; extra == 'dev'", "pytest-mock ; extra == 'dev'", "pytest-sugar ; extra == 'dev'" ], "requires_python": "", "summary": "A framework for distributed network packet sniffing and processing.", "version": "0.4.0" }, "last_serial": 5379684, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "29f95fcfbf2720eb4dd9fb814638f211", "sha256": "a56844ede93bb14279122f426da17ae686a8c10017ec04b1401bc37afed4f75d" }, "downloads": -1, "filename": "netdumplings-0.0.1.tar.gz", "has_sig": false, "md5_digest": "29f95fcfbf2720eb4dd9fb814638f211", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20699, "upload_time": "2016-05-19T06:02:27", "url": "https://files.pythonhosted.org/packages/52/0e/2789e75a5308623f791a41de2be4f3e9d116de2174e28cd9a78fc5ee2f66/netdumplings-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "fcbdbeb64163bc71a67cc70018a1247f", "sha256": "bcc111a8fc8e15bc3cda503daadd86ac2e0929c0f48fd6a53b6e719a1cbf6c0d" }, "downloads": -1, "filename": "netdumplings-0.1.0.tar.gz", "has_sig": false, "md5_digest": "fcbdbeb64163bc71a67cc70018a1247f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20839, "upload_time": "2016-11-25T04:42:24", "url": "https://files.pythonhosted.org/packages/7e/a5/7148a86daa19f83832764ea241af40ae77e1d3164528bdcf3d463b3d1b4b/netdumplings-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "26374a48cb24fc7df0100feb53035091", "sha256": "a9c200b3f8b52018ab5c0eaa975d6134eb60c12f4bc8b981033d17a7cd9c9071" }, "downloads": -1, "filename": "netdumplings-0.2.0.tar.gz", "has_sig": false, "md5_digest": "26374a48cb24fc7df0100feb53035091", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21597, "upload_time": "2017-10-16T01:07:35", "url": "https://files.pythonhosted.org/packages/46/d1/d59c1f235f9f2c7555261f6d6c46b1a11f6bd13cd979c355590ddb3ed15a/netdumplings-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "3e5aa6d73cd737805bec7563d96c3b64", "sha256": "0a51007f464fabbbb3e03ef4cd4893ea88c9455837bba3e2599ead247664d0f9" }, "downloads": -1, "filename": "netdumplings-0.3.0.tar.gz", "has_sig": false, "md5_digest": "3e5aa6d73cd737805bec7563d96c3b64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26474, "upload_time": "2018-01-28T02:00:58", "url": "https://files.pythonhosted.org/packages/14/14/1734a83f8dca81500295d7fbf1deb29cc194f964efbb2b5262224a2552a4/netdumplings-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "752be879bb5e171847090b4c9348484e", "sha256": "742c964bebf19daca9361eb1d114bb2b9810293580f241a80f9e7423c5ecfd68" }, "downloads": -1, "filename": "netdumplings-0.3.1.tar.gz", "has_sig": false, "md5_digest": "752be879bb5e171847090b4c9348484e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26543, "upload_time": "2018-01-28T04:03:16", "url": "https://files.pythonhosted.org/packages/2d/1f/bd3ed851878c2ecb6e27cbbd8056035d42449192e4befb32423702f50af6/netdumplings-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "bae59ebe32ae3a668a53e00706695506", "sha256": "0c6e95c8f9194632a4d952f35974d9659d87943702b3f67de7951505cae448ec" }, "downloads": -1, "filename": "netdumplings-0.3.2.tar.gz", "has_sig": false, "md5_digest": "bae59ebe32ae3a668a53e00706695506", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26720, "upload_time": "2018-01-28T04:27:33", "url": "https://files.pythonhosted.org/packages/a8/51/ee0d2b835ce208cb4921bb40fbd658caead095da96b9e606a2ae4fcbef66/netdumplings-0.3.2.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "eec4e029404fbc0c9c3c971d2b9104ac", "sha256": "08a82442925dd2dcd1450dd1d7c64628fa4aa4211c1f587a197895f6571532a1" }, "downloads": -1, "filename": "netdumplings-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "eec4e029404fbc0c9c3c971d2b9104ac", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 46326, "upload_time": "2019-06-10T04:29:16", "url": "https://files.pythonhosted.org/packages/76/99/80cbef778a9e91980611edf16c0d37702a2b00196a54d870b3db9165f978/netdumplings-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0fdab4cc93c403ab7839221001f1b870", "sha256": "0b31fc11050805792c266798a09619d9557e14bc73b467e0976c8c9387ca39ac" }, "downloads": -1, "filename": "netdumplings-0.4.0.tar.gz", "has_sig": false, "md5_digest": "0fdab4cc93c403ab7839221001f1b870", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26856, "upload_time": "2019-06-10T04:29:18", "url": "https://files.pythonhosted.org/packages/13/4f/509476da1be0476e42aff7847170b1b98858aee0780b60a38e5a93b565ca/netdumplings-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "eec4e029404fbc0c9c3c971d2b9104ac", "sha256": "08a82442925dd2dcd1450dd1d7c64628fa4aa4211c1f587a197895f6571532a1" }, "downloads": -1, "filename": "netdumplings-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "eec4e029404fbc0c9c3c971d2b9104ac", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 46326, "upload_time": "2019-06-10T04:29:16", "url": "https://files.pythonhosted.org/packages/76/99/80cbef778a9e91980611edf16c0d37702a2b00196a54d870b3db9165f978/netdumplings-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0fdab4cc93c403ab7839221001f1b870", "sha256": "0b31fc11050805792c266798a09619d9557e14bc73b467e0976c8c9387ca39ac" }, "downloads": -1, "filename": "netdumplings-0.4.0.tar.gz", "has_sig": false, "md5_digest": "0fdab4cc93c403ab7839221001f1b870", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26856, "upload_time": "2019-06-10T04:29:18", "url": "https://files.pythonhosted.org/packages/13/4f/509476da1be0476e42aff7847170b1b98858aee0780b60a38e5a93b565ca/netdumplings-0.4.0.tar.gz" } ] }