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 -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"
}