{ "info": { "author": "Sujit Ghosal", "author_email": "synack@outlook.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7", "Topic :: Internet", "Topic :: System :: Networking", "Topic :: Utilities" ], "description": "Pcapgen PCAP Generation Suite\n=================================\n\n# pgtlib\n-----------------------------------------\npgtlib is a wrapper built on top of Scapy to provide additional flexibility to create custom TCP client<->server packet captures. This module would also provide functionality to prefix 3-way TCP Handshake and close established connections gracefully.\n\n#### pgtlib usage\nLet's say over TCP/5555, you would like to send \"----> hey from client\\n\" from client and server echoes back with a response message saying, \"<---- ack data\\n\". Let's construct a packet based on this:\n\n```python\nfrom pcapgen.pgtlib import *\n\nfHandle = PCAP('/tmp/tcp.pcap') # PCAP Output Filename\nconn = fHandle.tcp_conn_to_server(5555) # Assign dest port as TCP/5555\nconn.to_server('----> hey from client\\n') # Client message to server\nconn.to_client('<---- ack data\\n') # Server message to client\nconn.finish() # Construct FIN\nfHandle.close() # Close file handle\nprint('[*]Done.')\n```\n\n# pft\n-----------------------------------------\nPCAP Fix Tool (pft, in short) is a wrapper on top of scapy. This utility helps in resolving broken TCP communications, changing endpoint directions and ports etc. This tool takes the C Arrays input of any TCP stream, appends the missing TCP 3-Way handshakes along with adding the necessary FIN TCP flags to terminate the established TCP communication gracefully.\n\n#### pft usage\n* Open faulty pcap and navigate to the faulty TCP stream index that you want to correct.\n* View data as 'C Arrays' and export the output to any flat file e.g. /tmp/raw\n* $python pft.py -p 1337 -w /tmp/raw\n* This would geneate raw.pcap (currently supports PCAP format only) which would have TCP/1337 as destination port along with the end-to-end PDU data intact.\n\n# pgt\n-----------------------------------------\nPCAP Genation Tool (pgt) is wrapper built on top of scapy again which generates simulated HTTP,FTP and Email (SMTP/IMAP) protocols data along with several encoding types i.e. base64, deflate, gzip etc.\n\n#### pgt usage\n```bash\n$python pgt.py ~/Desktop/sample.docx # Generates HTTP(GET/POST), FTP(active and passive), SMTP and IMAP PCAPs.\n```\n\n### External dependencies\n- scapy [pip install scapy]\n- python-magic [pip install python-magic]\n\n### Credits\n* Major credit goes to Andrewg Felinemenace for developing this excellent utility. Those scripts can be found [here](https://github.com/andrewg-felinemenace/PCAP-Generation-Tools)\n* Mine is just an add-on with some minor fixes on top of it. :)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://pypi.org/project/python-pcapgen/", "keywords": "pcapgen pcap wireshark pgt http imap smtp ftp protocol", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "pcapgen", "package_url": "https://pypi.org/project/pcapgen/", "platform": "", "project_url": "https://pypi.org/project/pcapgen/", "project_urls": { "Homepage": "https://pypi.org/project/python-pcapgen/" }, "release_url": "https://pypi.org/project/pcapgen/0.7/", "requires_dist": [ "python-magic (>=0.4.15)", "scapy (>=2.4.0)" ], "requires_python": "", "summary": "Module to generate PCAPs from any input file. This is a modified version of PGT tool which wasdeveloped earlier by, Andrewg Felinemenace.", "version": "0.7" }, "last_serial": 4058633, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "da80bede82de2210edffe482941ce79f", "sha256": "e29ac60b5155d7d9a7b01392a8fc94d12001ab654c745fc236069ab6cb2869c8" }, "downloads": -1, "filename": "pcapgen-0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "da80bede82de2210edffe482941ce79f", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11267, "upload_time": "2018-07-01T21:56:27", "url": "https://files.pythonhosted.org/packages/36/6d/266cb475414005b1015b4375b066051f9a0cbc80508bca2848265f1b7d62/pcapgen-0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3dde051a3a576f57509413ad6580a7a7", "sha256": "91f50d69ce2aee8fd2035b68af4b94ff7ec8ef8d90ca2403bf9eb0f550bfd373" }, "downloads": -1, "filename": "pcapgen-0.3.tar.gz", "has_sig": false, "md5_digest": "3dde051a3a576f57509413ad6580a7a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9921, "upload_time": "2018-07-01T21:56:29", "url": "https://files.pythonhosted.org/packages/0e/4f/f08ff7fe328e7584a07e362f7084dd15d2e97431d65bce87cc4492f0e124/pcapgen-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "971b0285c393c258b46fdbc6d277b7b8", "sha256": "1112b73d37bb4e7db9d7b3ddcd7003a0170669a268a9e8fd98af0d4839507dff" }, "downloads": -1, "filename": "pcapgen-0.4-py2-none-any.whl", "has_sig": false, "md5_digest": "971b0285c393c258b46fdbc6d277b7b8", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11263, "upload_time": "2018-07-01T22:25:13", "url": "https://files.pythonhosted.org/packages/1b/45/2ec7a60ccb222e9e719f99c89ab76f6462519f10c1ae9a7bb1f1c8917916/pcapgen-0.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a6ef0d34bbe1ccb5c3b7ea4181516f9c", "sha256": "039a962722aff61045dc299091a400823935695d463be0ded9687ea3caa451a5" }, "downloads": -1, "filename": "pcapgen-0.4.tar.gz", "has_sig": false, "md5_digest": "a6ef0d34bbe1ccb5c3b7ea4181516f9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9924, "upload_time": "2018-07-01T22:25:15", "url": "https://files.pythonhosted.org/packages/82/97/eac96c5bb57c84ac97c8d2d1fe14b197be095dd31238a3f53616374f6343/pcapgen-0.4.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "72bc0174af205e560466772610db6be9", "sha256": "283a699c150c12be9862e731bf8b659ac75c37500e5839ab2fbf20c8b9325703" }, "downloads": -1, "filename": "pcapgen-0.7-py2-none-any.whl", "has_sig": false, "md5_digest": "72bc0174af205e560466772610db6be9", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11319, "upload_time": "2018-07-13T16:55:05", "url": "https://files.pythonhosted.org/packages/f4/59/67ea0a8b0203bd18aad201b2540e9643945bb6e265e13d922278a9f4da28/pcapgen-0.7-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "49a98768518ab6f576e27d3ecbdada7b", "sha256": "7d22d8f8c9478f56ee369fc7529f4457fc9354793522e3d961fc9d042261872e" }, "downloads": -1, "filename": "pcapgen-0.7.tar.gz", "has_sig": false, "md5_digest": "49a98768518ab6f576e27d3ecbdada7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9996, "upload_time": "2018-07-13T16:55:06", "url": "https://files.pythonhosted.org/packages/7b/c5/d0454d76b14d24a16aea8f60ca3d0920ff247c55b428b8b51b209dfa2774/pcapgen-0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "72bc0174af205e560466772610db6be9", "sha256": "283a699c150c12be9862e731bf8b659ac75c37500e5839ab2fbf20c8b9325703" }, "downloads": -1, "filename": "pcapgen-0.7-py2-none-any.whl", "has_sig": false, "md5_digest": "72bc0174af205e560466772610db6be9", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11319, "upload_time": "2018-07-13T16:55:05", "url": "https://files.pythonhosted.org/packages/f4/59/67ea0a8b0203bd18aad201b2540e9643945bb6e265e13d922278a9f4da28/pcapgen-0.7-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "49a98768518ab6f576e27d3ecbdada7b", "sha256": "7d22d8f8c9478f56ee369fc7529f4457fc9354793522e3d961fc9d042261872e" }, "downloads": -1, "filename": "pcapgen-0.7.tar.gz", "has_sig": false, "md5_digest": "49a98768518ab6f576e27d3ecbdada7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9996, "upload_time": "2018-07-13T16:55:06", "url": "https://files.pythonhosted.org/packages/7b/c5/d0454d76b14d24a16aea8f60ca3d0920ff247c55b428b8b51b209dfa2774/pcapgen-0.7.tar.gz" } ] }