抓包解析项目中请求的mysql,redis,mongodb等请求

·  阅读 1514
原文链接: github.com

Capture mysql,redis,http,mongodb etc protocol...

GitHub license

Support List:

Demo:

$ go-sniffer en0 mysql复制代码

image

Setup:

  • support : MacOS Linux Unix
  • not support : windows

Centos

$ yum install libcap-devel复制代码

Ubuntu

$ apt-get install libcap-dev复制代码

MacOs

All is ok复制代码

RUN

$ go get -v github.com/40t/go-sniffer
$ cd $(go env GOPATH)/src/github.com/40t/go-sniffer
$ go run main.go复制代码

Usage:

==================================================================================
[Usage]

    go-sniffer [device] [plug] [plug's params(optional)]

    [Example]
          go-sniffer en0 redis          Capture redis packet
          go-sniffer en0 mysql -p 3306  Capture mysql packet

    go-sniffer --[commend]
               --help "this page"
               --env  "environment variable"
               --list "Plug-in list"
               --ver  "version"
               --dev  "device"
    [Example]
          go-sniffer --list "show all plug-in"

==================================================================================
[device] : lo0 :   127.0.0.1
[device] : en0 : xx:xx:xx:xx:xx:xx  192.168.199.221
==================================================================================复制代码

Example:

$ go-sniffer lo0 mysql 
$ go-sniffer en0 redis 
$ go-sniffer eth0 http -p 8080
$ go-sniffer eth1 mongodb复制代码

License:

MIT

收藏成功!
已添加到「」, 点击更改