{"id":13537982,"url":"https://github.com/invernizzi/scapy-http","last_synced_at":"2025-04-04T16:14:03.973Z","repository":{"id":3731679,"uuid":"4805278","full_name":"invernizzi/scapy-http","owner":"invernizzi","description":"Support for HTTP in Scapy","archived":false,"fork":false,"pushed_at":"2019-08-14T16:11:20.000Z","size":40,"stargazers_count":299,"open_issues_count":23,"forks_count":77,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-03-28T15:07:50.331Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/invernizzi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-27T07:00:58.000Z","updated_at":"2025-03-16T14:47:30.000Z","dependencies_parsed_at":"2022-07-28T22:29:10.743Z","dependency_job_id":null,"html_url":"https://github.com/invernizzi/scapy-http","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invernizzi%2Fscapy-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invernizzi%2Fscapy-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invernizzi%2Fscapy-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invernizzi%2Fscapy-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/invernizzi","download_url":"https://codeload.github.com/invernizzi/scapy-http/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208143,"owners_count":20901570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T09:01:05.497Z","updated_at":"2025-04-04T16:14:03.949Z","avatar_url":"https://github.com/invernizzi.png","language":"Python","funding_links":[],"categories":["\u003ca id=\"9eee96404f868f372a6cbc6769ccb7f8\"\u003e\u003c/a\u003e新添加的","\u003ca id=\"9eee96404f868f372a6cbc6769ccb7f8\"\u003e\u003c/a\u003e工具","\u003ca id=\"01f99d208e245eb44f15f720043b50d4\"\u003e\u003c/a\u003eScapy"],"sub_categories":["\u003ca id=\"31185b925d5152c7469b963809ceb22d\"\u003e\u003c/a\u003e新添加的"],"readme":"\nOBSOLETE!\n=========\nScapy 2.4.3+ has [native](https://github.com/secdev/scapy/pull/1925) support for HTTP.  It has the same syntax as this package (isn't that nice), plus it packs more features!\n\nPlease consider this package as obsolete - long live Scapy!\n\n__DEPRECATED!__\n__DEPRECATED!__\n__DEPRECATED!__\n\n\n\n\n\nScapy-http\n==========\nSupport for parsing HTTP in [Scapy](http://www.secdev.org/projects/scapy/). Compatible with [Scapy3k](https://github.com/phaethon/scapy).\n\nCollaborator wanted!\n--------\nHi there, internet stranger! As time is a scarce resource for me nowadays, I'm looking for a collaborator to handle issues and pull requests in a more timely manner. If you are interested, send me an email at `invernizzi.l@gmail.com`. \n\nInstallation\n--------\n\nExecute:\n\n```bash\nsudo pip install scapy-http\n```\n\nOr, to install from source\n```bash\nsudo python setup.py install\n```\n\n\nExample\n--------\n\n## Code\n```python\n#!/usr/bin/env python\ntry:\n    import scapy.all as scapy\nexcept ImportError:\n    import scapy\n\ntry:\n    # This import works from the project directory\n    import scapy_http.http\nexcept ImportError:\n    # If you installed this package via pip, you just need to execute this\n    from scapy.layers import http\n\npackets = scapy.rdpcap('example_network_traffic.pcap')\nfor p in packets:\n    print '=' * 78\n    p.show()\n```\n\n## Output\n\n```python\n==============================================================================\n###[ Ethernet ]###\n  dst       = 00:21:29:77:3d:d8\n  src       = 64:80:99:63:29:94\n  type      = 0x800\n###[ IP ]###\n     version   = 4L\n     ihl       = 5L\n     tos       = 0x0\n     len       = 154\n     id        = 46316\n     flags     = DF\n     frag      = 0L\n     ttl       = 64\n     proto     = tcp\n     chksum    = 0x100b\n     src       = 192.168.1.105\n     dst       = 207.97.227.243\n     \\options   \\\n###[ TCP ]###\n        sport     = 52157\n        dport     = http\n        seq       = 3687400232\n        ack       = 2748912324\n        dataofs   = 5L\n        reserved  = 0L\n        flags     = PA\n        window    = 14600\n        chksum    = 0xb333\n        urgptr    = 0\n        options   = []\n###[ HTTP ]###\n###[ HTTP Request ]###\n              Method    = 'GET'\n              Path      = '/'\n              Http-Version= 'HTTP/1.1'\n              Host      = 'www.github.com'\n              User-Agent= 'Wget/1.13.4 (linux-gnu)'\n              Accept    = '*/*'\n              Accept-Language= None\n              Accept-Encoding= None\n              Accept-Charset= None\n              Referer   = None\n              Authorization= None\n              Expect    = None\n              From      = None\n              If-Match  = None\n              If-Modified-Since= None\n              If-None-Match= None\n              If-Range  = None\n              If-Unmodified-Since= None\n              Max-Forwards= None\n              Proxy-Authorization= None\n              Range     = None\n              TE        = None\n              Cache-Control= None\n              Connection= 'Keep-Alive'\n              Date      = None\n              Pragma    = None\n              Trailer   = None\n              Transfer-Encoding= None\n              Upgrade   = None\n              Via       = None\n              Warning   = None\n              Keep-Alive= None\n              Allow     = None\n              Content-Encoding= None\n              Content-Language= None\n              Content-Length= None\n              Content-Location= None\n              Content-MD5= None\n              Content-Range= None\n              Content-Type= None\n              Expires   = None\n              Last-Modified= None\n              Cookie    = None\n              Additional-Headers= None\n==============================================================================\n###[ Ethernet ]###\n  dst       = 64:80:99:63:29:94\n  src       = 00:21:29:77:3d:d8\n  type      = 0x800\n###[ IP ]###\n     version   = 4L\n     ihl       = 5L\n     tos       = 0x0\n     len       = 418\n     id        = 29348\n     flags     = DF\n     frag      = 0L\n     ttl       = 55\n     proto     = tcp\n     chksum    = 0x5a4b\n     src       = 207.97.227.243\n     dst       = 192.168.1.105\n     \\options   \\\n###[ TCP ]###\n        sport     = http\n        dport     = 52157\n        seq       = 2748912324\n        ack       = 3687400346\n        dataofs   = 5L\n        reserved  = 0L\n        flags     = PA\n        window    = 5840\n        chksum    = 0x78e7\n        urgptr    = 0\n        options   = []\n###[ HTTP ]###\n###[ HTTP Response ]###\n              Status-Line= 'HTTP/1.1 301 Moved Permanently'\n              Accept-Ranges= None\n              Age       = None\n              E-Tag     = None\n              Location  = 'http://github.com/'\n              Proxy-Authenticate= None\n              Retry-After= None\n              Server    = 'nginx/1.0.13'\n              Vary      = None\n              WWW-Authenticate= None\n              Cache-Control= None\n              Connection= 'keep-alive'\n              Date      = 'Wed, 27 Jun 2012 06:53:41 GMT'\n              Pragma    = None\n              Trailer   = None\n              Transfer-Encoding= None\n              Upgrade   = None\n              Via       = None\n              Warning   = None\n              Keep-Alive= None\n              Allow     = None\n              Content-Encoding= None\n              Content-Language= None\n              Content-Length= '185'\n              Content-Location= None\n              Content-MD5= None\n              Content-Range= None\n              Content-Type= 'text/html'\n              Expires   = None\n              Last-Modified= None\n              Additional-Headers= None\n###[ Raw ]###\n                 load      = '\u003chtml\u003e\\r\\n\u003chead\u003e\u003ctitle\u003e301 Moved Permanently\u003c/title\u003e\u003c/head\u003e\\r\\n\u003cbody bgcolor=\"white\"\u003e\\r\\n\u003ccenter\u003e\u003ch1\u003e301 Moved Permanently\u003c/h1\u003e\u003c/center\u003e\\r\\n\u003chr\u003e\u003ccenter\u003enginx/1.0.13\u003c/center\u003e\\r\\n\u003c/body\u003e\\r\\n\u003c/html\u003e\\r\\n'\n\n```\n\n## Authors\n* Steeve Barbeau  ( http://www.sbarbeau.fr )\n* Luca Invernizzi ( http://lucainvernizzi.net )\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvernizzi%2Fscapy-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finvernizzi%2Fscapy-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvernizzi%2Fscapy-http/lists"}