refactor: 去掉UDP扫描、优化了DCInfo和MiniDump的检测机制

This commit is contained in:
ZacharyZcR
2024-12-28 06:38:44 +08:00
parent ee1d176a8f
commit 2ce7041c95
8 changed files with 60 additions and 22 deletions
+1 -7
View File
@@ -91,10 +91,7 @@ func PortConnect(addr Addr, respondingHosts chan<- string, timeout int64, wg *sy
var isOpen bool
var err error
if Common.UseUdpScan {
// UDP扫描
isOpen, err = UDPScan(addr.ip, addr.port, timeout)
} else if Common.UseSynScan {
if Common.UseSynScan {
// SYN扫描
isOpen, err = SynScan(addr.ip, addr.port, timeout)
} else {
@@ -115,9 +112,6 @@ func PortConnect(addr Addr, respondingHosts chan<- string, timeout int64, wg *sy
// 记录开放端口
address := fmt.Sprintf("%s:%d", addr.ip, addr.port)
protocol := "TCP"
if Common.UseUdpScan {
protocol = "UDP"
}
result := fmt.Sprintf("[+] %s端口开放 %s", protocol, address)
Common.LogSuccess(result)