Merge branch 'master' of github.com:40t/go-sniffer

This commit is contained in:
solar 2019-03-07 07:59:07 +08:00
commit 43a106b442
2 changed files with 5 additions and 1 deletions

View File

@ -25,6 +25,7 @@ $ go-sniffer en0 mysql
## Setup: ## Setup:
- support : `MacOS` `Linux` `Unix` - support : `MacOS` `Linux` `Unix`
- not support : `windows` - not support : `windows`
- If you encounter problems in the `go get` process, try upgrading the go version 如果go get 过程中遇到问题请尝试升级go版本
### Centos ### Centos
``` bash ``` bash
@ -36,7 +37,7 @@ $ apt-get install libpcap-dev
``` ```
### MacOs ### MacOs
``` bash ``` bash
All is ok
``` ```
### RUN ### RUN
``` bash ``` bash

View File

@ -218,6 +218,9 @@ func (stm *stream) findStmtPacket(srv chan *packet, seq int) *packet {
func (stm *stream) resolveServerPacket(payload []byte, seq int) { func (stm *stream) resolveServerPacket(payload []byte, seq int) {
var msg = "" var msg = ""
if len(payload) == 0 {
return
}
switch payload[0] { switch payload[0] {
case 0xff: case 0xff: