{"id":13490783,"url":"https://github.com/hsiafan/httpdump","last_synced_at":"2025-03-28T07:31:27.865Z","repository":{"id":5420056,"uuid":"6611424","full_name":"hsiafan/httpdump","owner":"hsiafan","description":"Capture and parse http traffics","archived":false,"fork":false,"pushed_at":"2023-10-19T01:47:08.000Z","size":5389,"stargazers_count":595,"open_issues_count":8,"forks_count":176,"subscribers_count":41,"default_branch":"master","last_synced_at":"2025-03-15T04:02:54.346Z","etag":null,"topics":["capture","http","pcap-analyzer"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hsiafan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2012-11-09T09:50:08.000Z","updated_at":"2025-02-26T03:56:50.000Z","dependencies_parsed_at":"2024-01-15T13:33:37.157Z","dependency_job_id":null,"html_url":"https://github.com/hsiafan/httpdump","commit_stats":{"total_commits":82,"total_committers":9,"mean_commits":9.11111111111111,"dds":0.6707317073170731,"last_synced_commit":"49c42ed00eb34bec5e1c7926bbf6272f47b7dafb"},"previous_names":["caoqianli/httpcap"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsiafan%2Fhttpdump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsiafan%2Fhttpdump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsiafan%2Fhttpdump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hsiafan%2Fhttpdump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hsiafan","download_url":"https://codeload.github.com/hsiafan/httpdump/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245989079,"owners_count":20705754,"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":["capture","http","pcap-analyzer"],"created_at":"2024-07-31T19:00:50.891Z","updated_at":"2025-03-28T07:31:27.388Z","avatar_url":"https://github.com/hsiafan.png","language":"Go","readme":"Parse and display http traffic from network device or pcap file. This is a go version of origin pcap-parser, thanks to gopacket project, this tool has simpler code base and is more efficient.\n\nFor original python implementation, [refer to httpcap on pypi](https://pypi.org/project/httpcap/).\n\nNote: This tool **can not parse HTTPS/HTTP2 traffics**.\n\n# Install \u0026 Requirement\nBuild httpdump requires libpcap-dev and cgo enabled.\n## libpcap\nfor ubuntu/debian:\n\n```sh\nsudo apt install libpcap-dev\n```\n\nfor centos/redhat/fedora:\n\n```sh\nsudo yum install libpcap-devel\n```\n\nfor osx:\n\nLibpcap and header files should be available in macOS already.\n\n## Install\n\n```sh\ngo get github.com/hsiafan/httpdump\n```\n\n\n# Usage\nhttpdump can read from pcap file, or capture data from network interfaces. Usage:\n\n```\nUsage: httpdump \n  -curl\n    \tOutput an equivalent curl command for each http request\n  -device string\n    \tCapture packet from network device. If is any, capture all interface traffics (default \"any\")\n  -dump-body\n    \tdump http request/response body to file\n  -file string\n    \tRead from pcap file. If not set, will capture data from network device by default\n  -force\n    \tForce print unknown content-type http body even if it seems not to be text content\n  -host string\n    \tFilter by request host, using wildcard match(*, ?)\n  -idle duration\n    \tIdle time to remove connection if no package received (default 4m0s)\n  -ip string\n    \tFilter by ip, if either source or target ip is matched, the packet will be processed\n  -level string\n    \tOutput level, options are: url(only url) | header(http headers) | all(headers, and textuary http body) (default \"header\")\n  -output string\n    \tWrite result to file [output] instead of stdout\n  -port uint\n    \tFilter by port, if either source or target port is matched, the packet will be processed.\n  -pretty\n    \tTry to format and prettify json content\n  -status string\n    \tFilter by response status code. Can use range. eg: 200, 200-300 or 200:300-400\n  -uri string\n    \tFilter by request url path, using wildcard match(*, ?)\n\n```\n\n## Samples\nA simple capture:\n\n```\n$ httpdump\n192.168.110.48:56585  -----\u003e  101.201.170.152:80\nGET / HTTP/1.1\nHost: geek.csdn.net\nConnection: keep-alive\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\nUpgrade-Insecure-Requests: 1\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36\nDNT: 1\nAccept-Encoding: gzip, deflate, sdch\nAccept-Language: zh-CN,zh;q=0.8\nCookie: uuid_tt_dd=-7445280944848876972_20160309; _JQCMT_ifcookie=1; _JQCMT_browser=8cc6c51a0610de98f19cf86af0855a3e; lzstat_uv=24444940273412920400|2839507@3117794@3311294\n\n\n101.201.170.152:80  \u003c-----  192.168.110.48:56585\nHTTP/1.1 200 OK\nServer: openresty\nDate: Tue, 31 May 2016 02:40:14 GMT\nContent-Type: text/html; charset=utf-8\nTransfer-Encoding: chunked\nConnection: keep-alive\nKeep-Alive: timeout=20\nVary: Accept-Encoding\nVary: Accept-Encoding\nContent-Encoding: gzip\n\n{body size: 15482 , set level arg to all to display body content}\n```\n\nMore:\n\n```sh\n# parse pcap file\nsudo tcpdump -wa.pcap tcp\nhttpdump -file a.pcap\n\n# capture specified device:\nhttpdump -device eth0\n\n# filter by ip and/or port\nhttpdump -port 80  # filter by port\nhttpdump -ip 101.201.170.152 # filter by ip\nhttpdump -ip 101.201.170.152 -port 80 # filter by ip and port\n```\n\n","funding_links":[],"categories":["Go","Go (531)","Library for Network Packets"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhsiafan%2Fhttpdump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhsiafan%2Fhttpdump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhsiafan%2Fhttpdump/lists"}