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
+4 -2
View File
@@ -5,7 +5,6 @@ package services
import (
"bufio"
"context"
"fmt"
"strings"
"time"
@@ -88,7 +87,10 @@ func (p *IMAPPlugin) tryLogin(ctx context.Context, info *common.HostInfo, cred p
return nil
}
loginCmd := fmt.Sprintf("a001 LOGIN %s %s\r\n", cred.Username, cred.Password)
loginCmd, err := buildIMAPLoginCommand("a001", cred.Username, cred.Password)
if err != nil {
return nil
}
if _, err := conn.Write([]byte(loginCmd)); err != nil {
return nil
}