Harden scan robustness and tests

This commit is contained in:
ZacharyZcR
2026-06-14 22:23:48 +08:00
parent 5ad914a1bb
commit c49c23c7f0
100 changed files with 4483 additions and 412 deletions
+1 -4
View File
@@ -64,10 +64,7 @@ func parseZooKeeperResponse(data []byte) (string, bool) {
lower := strings.ToLower(resp)
if strings.Contains(lower, "zookeeper") || strings.Contains(lower, "zk_version") ||
strings.Contains(lower, "mode:") || strings.Contains(lower, "not in the whitelist") {
if len(resp) > 200 {
resp = resp[:200]
}
return resp, true
return truncateRunes(resp, 200), true
}
return "", false
}