{ "info": { "author": "xiaxiaocao", "author_email": "dongliu@live.cn", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": ".. figure:: https://img.shields.io/badge/licence-Simplified%20BSD-blue.svg?style=flat\n :alt: License\n\n License\n\nHttpcap (Former name pcap-parser)\n---------------------------------\n\nCapture, parse and display HTTP traffics. Python 2.7.\\* or Python 3.3+\nrequired.\n\nThis module parses pcap/pcapng files, or capture traffics from\ndevice(with libpcap), then retrieves HTTP data, and display as text.\nPcap files can be obtained via tcpdump, wireshark or other similar\ntools.\n\nFeatures:\n\n- HTTP requests/responses grouped by TCP connections; the requests in\n one keep-alive http connection will display together.\n- Managed chunked and compressed HTTP requests/responses.\n- Managed character encoding\n- Format JSON content in a beautiful way.\n\nInstall\n~~~~~~~\n\nThis module can be installed via pip:\n\n.. code:: sh\n\n pip install httpcap\n\nTHen you should have tools parse-pcap and parse-live installed \\* For\nparsing pcap file, use parse-pcap \\* For capturing and parsing traffic\nfrom net work device, use parse-live\n\nUsage\n~~~~~\n\nBasic usage:\n\n.. code:: sh\n\n # Use tcpdump to capture packets:\n tcpdump -wtest.pcap tcp port 80\n # only output the requested URL and response status\n parse-pcap test.pcap\n # or use pipe\n sudo tcpdump -w- tcp port 80 | parse-pcap\n # parse-live need to be root. capture network device en1\n # on linux/osx ifconfig to see all network devices\n sudo parse-live en1\n # capture traffics on all devices\n sudo parse-live\n\nFollowing take parse-pcap as example. parse-live works exactly same as\nparse-pcap, just change file name to device name.\n\nOutput level\n^^^^^^^^^^^^\n\nParse-pcap/parse-live only show urls by default. Use -v to display more:\nThen:\n\n.. code:: sh\n\n # output http req/resp headers\n parse-pcap -v test.pcap\n # output http req/resp headers and body which belong to text type\n parse-pcap -vv test.pcap\n # output http req/resp headers and body\n parse-pcap -vvv test.pcap\n # display and attempt to do url decoding and formatting json output\n parse-pcap -vvb test.pcap\n\nGroup\n^^^^^\n\nUse -g to group http request/responses:\n\n.. code:: sh\n\n parse-pcap -g test.pcap\n\nThe result looks like:\n\n::\n\n ********** [10.66.133.90:56240] -- -- --> [220.181.90.13:80] **********\n GET http://s1.rr.itc.cn/w/u/0/20120611181946_24.jpg\n HTTP/1.1 200 OK\n GET http://s1.rr.itc.cn/p/images/imgloading.jpg\n HTTP/1.1 200 OK\n GET http://s1.rr.itc.cn/w/u/0/20130201103132_66.png\n HTTP/1.1 200 OK\n GET http://s1.rr.itc.cn/w/u/0/20120719174136_77.png\n HTTP/1.1 200 OK\n GET http://s1.rr.itc.cn/p/images/pic_prev_open.png\n HTTP/1.1 200 OK\n\n ********** [10.66.133.90:47526] -- -- --> [220.181.90.13:80] **********\n GET http://s1.rr.itc.cn/w/u/0/20130227132442_43.png\n HTTP/1.1 200 OK\n GET http://s1.rr.itc.cn/p/images/pic_next.png\n HTTP/1.1 200 OK\n GET http://s1.rr.itc.cn/p/images/pic_prev.png\n HTTP/1.1 200 OK\n GET http://s1.rr.itc.cn/p/images/pic_next_open.png\n HTTP/1.1 200 OK\n\nFilter\n^^^^^^\n\nYou can use the -i/-p options to specify the ip/port of source and\ndestination and ``parse-pcap`` will only display HTTP data that meets\nthe specified conditions:\n\n.. code:: sh\n\n parse-pcap -p55419 -vv test.pcap\n parse-pcap -i192.168.109.91 -vv test.pcap\n\nUse -d to specify the HTTP domain; only displays HTTP req/resp with the\nspecified domain:\n\n.. code:: sh\n\n parse-pcap -dwww.baidu.com -vv test.pcap\n\nUse -u to specify the HTTP uri pattern; only displays HTTP req/resp in\nwhich the url contains the specified url pattern:\n\n.. code:: sh\n\n parse-pcap -u/api/update -vv test.pcap\n\nEncoding\n^^^^^^^^\n\nUse -e to force the encoding used for the HTTP bodies:\n\n.. code:: sh\n\n parse-pcap -i192.168.109.91 -p80 -vv -eutf-8 test.pcap", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/caoqianli/httpcap", "keywords": null, "license": "Simplified BSD License", "maintainer": null, "maintainer_email": null, "name": "httpcap", "package_url": "https://pypi.org/project/httpcap/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/httpcap/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/caoqianli/httpcap" }, "release_url": "https://pypi.org/project/httpcap/0.7.9/", "requires_dist": null, "requires_python": null, "summary": "Capture and parse http traffics with python", "version": "0.7.9" }, "last_serial": 4418114, "releases": { "0.7.6": [ { "comment_text": "", "digests": { "md5": "588ed5594678f489bf53dbcd225cafc4", "sha256": "0dc0f44acd401e55d5fa8680e7892f28889eb49b274e33d28499171519c88a5b" }, "downloads": -1, "filename": "httpcap-0.7.6.tar.gz", "has_sig": false, "md5_digest": "588ed5594678f489bf53dbcd225cafc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28328, "upload_time": "2016-06-12T08:14:26", "url": "https://files.pythonhosted.org/packages/90/bc/509341984af40b54bcde797fc5ec58c28060ead1235009e6fdb139fd356a/httpcap-0.7.6.tar.gz" } ], "0.7.7": [ { "comment_text": "", "digests": { "md5": "bf8d99e6d77e9d05b4caa5209e40f6ec", "sha256": "13ec030c0f8a125a307addd3165f46f26e35dfdc6e4e6ff6e036a662d4e816e7" }, "downloads": -1, "filename": "httpcap-0.7.7.tar.gz", "has_sig": false, "md5_digest": "bf8d99e6d77e9d05b4caa5209e40f6ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28370, "upload_time": "2016-06-24T02:26:30", "url": "https://files.pythonhosted.org/packages/7e/d6/c85cfed94fb3ec4540f9e370ab455fcd87fe769f66466c3fb319eb4e6299/httpcap-0.7.7.tar.gz" } ], "0.7.8": [ { "comment_text": "", "digests": { "md5": "f98a5e146800602eaf6a7e02d4c08368", "sha256": "46ddda903b1f7ec2528a5c5c03b654177188103b8eab84b6296cb9755aa3ac58" }, "downloads": -1, "filename": "httpcap-0.7.8.tar.gz", "has_sig": false, "md5_digest": "f98a5e146800602eaf6a7e02d4c08368", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28400, "upload_time": "2016-08-29T03:16:37", "url": "https://files.pythonhosted.org/packages/7f/e8/7403c2f4105c1bf59bb0c85a1ff158879fbc6011dc05d16511ada3ccc42f/httpcap-0.7.8.tar.gz" } ], "0.7.9": [ { "comment_text": "", "digests": { "md5": "89a4f62c77f209eb04cc92af72026cb3", "sha256": "d4e0d2168e6fe2b4745d997a27e272a053fdd716f74b14ee74a835b11475ea60" }, "downloads": -1, "filename": "httpcap-0.7.9.tar.gz", "has_sig": false, "md5_digest": "89a4f62c77f209eb04cc92af72026cb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28547, "upload_time": "2016-09-15T23:26:41", "url": "https://files.pythonhosted.org/packages/74/e1/8c396d1deb980c9d250f383f51cdfb775ef3b9b1eb1d99e0fff3b109a0be/httpcap-0.7.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "89a4f62c77f209eb04cc92af72026cb3", "sha256": "d4e0d2168e6fe2b4745d997a27e272a053fdd716f74b14ee74a835b11475ea60" }, "downloads": -1, "filename": "httpcap-0.7.9.tar.gz", "has_sig": false, "md5_digest": "89a4f62c77f209eb04cc92af72026cb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28547, "upload_time": "2016-09-15T23:26:41", "url": "https://files.pythonhosted.org/packages/74/e1/8c396d1deb980c9d250f383f51cdfb775ef3b9b1eb1d99e0fff3b109a0be/httpcap-0.7.9.tar.gz" } ] }