mirror of
https://github.com/zr-hebo/sniffer-agent.git
synced 2025-09-19 18:19:20 +08:00
deal all auth packet
This commit is contained in:
@@ -25,11 +25,12 @@ func CheckParams() {
|
||||
}
|
||||
}
|
||||
|
||||
func IsAuthPacket(val byte) bool {
|
||||
func IsAuthPacket(payload []byte) bool {
|
||||
switch serviceType {
|
||||
case ServiceTypeMysql:
|
||||
return mysql.IsAuthPacket(val)
|
||||
return len(payload) >= 5 && mysql.IsAuth(payload[4])
|
||||
|
||||
default:
|
||||
return mysql.IsAuthPacket(val)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user