Harden scan robustness and tests

This commit is contained in:
ZacharyZcR
2026-06-13 07:55:37 +08:00
parent 1595c92aed
commit 15a7670ba2
100 changed files with 4483 additions and 412 deletions
+1 -3
View File
@@ -76,9 +76,7 @@ func parseTFTPResponse(data []byte) (string, bool) {
return "TFTP DATA response", true
case 0x05:
msg := strings.TrimRight(string(data[4:]), "\x00")
if len(msg) > 160 {
msg = msg[:160]
}
msg = truncateRunes(msg, 160)
if msg == "" {
msg = "error response"
}