chore(discovery): silence ping failure logs during scan

This commit is contained in:
12600k-rog-d4
2026-08-13 02:06:35 +08:00
parent ab81cee9b0
commit 84f24d1972

View File

@@ -106,7 +106,6 @@ func (s *Scanner) ping(ip string) bool {
cmd := exec.CommandContext(ctx, "ping", "-n", "1", "-w", fmt.Sprintf("%d", pingWait), ip) cmd := exec.CommandContext(ctx, "ping", "-n", "1", "-w", fmt.Sprintf("%d", pingWait), ip)
out, err := cmd.Output() out, err := cmd.Output()
if err != nil { if err != nil {
fmt.Printf(" [-] %s ping err=%v\n", ip, err)
return false return false
} }
// Windows 下 ping 输出为 GBK 编码,解码为 UTF-8 后再解析 // Windows 下 ping 输出为 GBK 编码,解码为 UTF-8 后再解析