perf: 统一错误输出

This commit is contained in:
ZacharyZcR
2024-12-21 17:21:41 +08:00
parent 497bc2e86b
commit 33cb33b1ad
7 changed files with 25 additions and 25 deletions
+2 -2
View File
@@ -187,7 +187,7 @@ func AddScan(plugin string, info Common.HostInfo, ch *chan struct{}, wg *sync.Wa
func ScanFunc(name *string, info *Common.HostInfo) {
defer func() {
if err := recover(); err != nil {
fmt.Printf("[!] 扫描错误 %v:%v - %v\n", info.Host, info.Ports, err)
fmt.Printf("[-] 扫描错误 %v:%v - %v\n", info.Host, info.Ports, err)
}
}()
@@ -200,7 +200,7 @@ func ScanFunc(name *string, info *Common.HostInfo) {
// 直接调用扫描函数
if err := plugin.ScanFunc(info); err != nil {
fmt.Printf("[!] 扫描错误 %v:%v - %v\n", info.Host, info.Ports, err)
fmt.Printf("[-] 扫描错误 %v:%v - %v\n", info.Host, info.Ports, err)
}
}