新增LiveTop功能,检测存活时,默认会输出top10的b、c段ip存活数量

This commit is contained in:
影舞者
2022-01-07 13:38:38 +08:00
parent 60cd94d459
commit 6ce60284bc
5 changed files with 76 additions and 9 deletions
+5 -3
View File
@@ -23,15 +23,17 @@ func Scan(info common.HostInfo) {
var wg = sync.WaitGroup{}
if len(Hosts) > 0 {
if common.IsPing == false {
Hosts = ICMPRun(Hosts, common.Ping)
fmt.Println("icmp alive hosts len is:", len(Hosts))
Hosts = CheckLive(Hosts, common.Ping)
fmt.Println("[*] Icmp alive hosts len is:", len(Hosts))
}
if info.Scantype == "icmp" {
common.LogWG.Wait()
return
}
AlivePorts := PortScan(Hosts, info.Ports, info.Timeout)
fmt.Println("alive ports len is:", len(AlivePorts))
fmt.Println("[*] alive ports len is:", len(AlivePorts))
if info.Scantype == "portscan" {
common.LogWG.Wait()
return
}