{"id":13540260,"url":"https://github.com/40t/go-sniffer","last_synced_at":"2025-05-15T16:02:56.976Z","repository":{"id":39914688,"uuid":"150212148","full_name":"40t/go-sniffer","owner":"40t","description":"🔎Sniffing and parsing mysql,redis,http,mongodb etc protocol. 抓包截取项目中的数据库请求并解析成相应的语句。","archived":false,"fork":false,"pushed_at":"2022-12-07T10:13:17.000Z","size":6526,"stargazers_count":1897,"open_issues_count":30,"forks_count":359,"subscribers_count":59,"default_branch":"master","last_synced_at":"2025-04-07T21:11:38.219Z","etag":null,"topics":["capture","go","mongodb","mysql","redis","sniffer"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/40t.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}},"created_at":"2018-09-25T05:27:11.000Z","updated_at":"2025-03-12T14:41:45.000Z","dependencies_parsed_at":"2023-01-23T16:45:07.417Z","dependency_job_id":null,"html_url":"https://github.com/40t/go-sniffer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/40t%2Fgo-sniffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/40t%2Fgo-sniffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/40t%2Fgo-sniffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/40t%2Fgo-sniffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/40t","download_url":"https://codeload.github.com/40t/go-sniffer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254374398,"owners_count":22060609,"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","go","mongodb","mysql","redis","sniffer"],"created_at":"2024-08-01T09:01:43.943Z","updated_at":"2025-05-15T16:02:56.937Z","avatar_url":"https://github.com/40t.png","language":"Go","funding_links":[],"categories":["Misc","\u003ca id=\"79499aeece9a2a9f64af6f61ee18cbea\"\u003e\u003c/a\u003e浏览嗅探\u0026\u0026流量拦截\u0026\u0026流量分析\u0026\u0026中间人","Go","\u003ca id=\"7bf0f5839fb2827fdc1b93ae6ac7f53d\"\u003e\u003c/a\u003e工具","Repositories","Go (531)"],"sub_categories":["\u003ca id=\"99398a5a8aaf99228829dadff48fb6a7\"\u003e\u003c/a\u003e未分类-Network","\u003ca id=\"32739127f0c38d61b14448c66a797098\"\u003e\u003c/a\u003e嗅探\u0026\u0026Sniff"],"readme":"\n# go-sniffer\n\n\u003e Capture mysql,redis,http,mongodb etc protocol...\n\u003e 抓包截取项目中的数据库请求并解析成相应的语句，如mysql协议会解析为sql语句,便于调试。\n\u003e 不要修改代码，直接嗅探项目中的数据请求。\n\n[![GitHub license](https://img.shields.io/github/license/40t/go-sniffer.svg?style=popout-square)](https://github.com/40t/go-sniffer/blob/master/LICENSE)\n\n#### [中文使用说明](#中文使用说明)\n\n## Support List:\n- [mysql](#mysql)\n- [Redis](#redis)\n- [Http](#http)\n- [Mongodb](#mongodb)\n- Kafka (developing)\n- ...\n\n## Demo:\n``` bash\n$ go-sniffer en0 mysql\n```\n![image](https://github.com/40t/go-sniffer/raw/master/images/demo.gif)\n## Setup:\n- support : `MacOS` `Linux` `Unix`\n- not support : `windows`\n- If you encounter problems in the `go get` process, try upgrading the go version （如果go get 过程中遇到问题，请尝试升级go版本）\n\n### Centos\n``` bash\n$ yum -y install libpcap-devel\n```\n### Ubuntu\n``` bash\n$ apt-get install libpcap-dev\n```\n### MacOs\n``` bash\n\n```\n### RUN\n``` bash\n$ go get -v -u github.com/40t/go-sniffer\n$ cp -rf $(go env GOPATH)/bin/go-sniffer /usr/local/bin\n$ go-sniffer\n```\n## Usage:\n``` bash\n==================================================================================\n[Usage]\n\n    go-sniffer [device] [plug] [plug's params(optional)]\n\n    [Example]\n          go-sniffer en0 redis          Capture redis packet\n          go-sniffer en0 mysql -p 3306  Capture mysql packet\n\n    go-sniffer --[commend]\n               --help \"this page\"\n               --env  \"environment variable\"\n               --list \"Plug-in list\"\n               --ver  \"version\"\n               --dev  \"device\"\n    [Example]\n          go-sniffer --list \"show all plug-in\"\n\n==================================================================================\n[device] : lo0 :   127.0.0.1\n[device] : en0 : xx:xx:xx:xx:xx:xx  192.168.199.221\n==================================================================================\n```\n\n#### 中文使用说明\n``` bash\n=======================================================================\n[使用说明]\n\n    go-sniffer [设备名] [插件名] [插件参数(可选)]\n\n    [例子]\n          go-sniffer en0 redis          抓取redis数据包\n          go-sniffer en0 mysql -p 3306  抓取mysql数据包,端口3306\n\n    go-sniffer --[命令]\n               --help 帮助信息\n               --env  环境变量\n               --list 插件列表\n               --ver  版本信息\n               --dev  设备列表\n    [例子]\n          go-sniffer --list 查看可抓取的协议\n\n=======================================================================\n[设备名] : lo0 :   127.0.0.1\n[设备名] : en0 : x:x:x:x:x5:x  192.168.1.3\n[设备名] : utun2 :   1.1.11.1\n=======================================================================\n```\n\n### Example:\n``` bash\n$ go-sniffer lo0 mysql \n$ go-sniffer en0 redis \n$ go-sniffer eth0 http -p 8080\n$ go-sniffer eth1 mongodb\n```\n## License:\n[MIT](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F40t%2Fgo-sniffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F40t%2Fgo-sniffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F40t%2Fgo-sniffer/lists"}