mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-07-14 13:22:35 +08:00
新增LiveTop功能,检测存活时,默认会输出top10的b、c段ip存活数量
This commit is contained in:
parent
0b22898547
commit
dbb6f43fc1
@ -71,18 +71,22 @@ func CheckLive(hostslist []string, Ping bool) []string {
|
|||||||
|
|
||||||
livewg.Wait()
|
livewg.Wait()
|
||||||
close(chanHosts)
|
close(chanHosts)
|
||||||
if common.IsIPRange {
|
|
||||||
|
if len(hostslist) > 1000 {
|
||||||
arrTop, arrLen := ArrayCountValueTop(AliveHosts, common.LiveTop, true)
|
arrTop, arrLen := ArrayCountValueTop(AliveHosts, common.LiveTop, true)
|
||||||
for i := 0; i < len(arrTop); i++ {
|
for i := 0; i < len(arrTop); i++ {
|
||||||
output := fmt.Sprintf("[*] LiveTop %-16s 段存活数量为: %d", arrTop[i]+".0.0/16", arrLen[i])
|
output := fmt.Sprintf("[*] LiveTop %-16s 段存活数量为: %d", arrTop[i]+".0.0/16", arrLen[i])
|
||||||
common.LogSuccess(output)
|
common.LogSuccess(output)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arrTop, arrLen := ArrayCountValueTop(AliveHosts, common.LiveTop, false)
|
if len(hostslist) >= 200 {
|
||||||
for i := 0; i < len(arrTop); i++ {
|
arrTop, arrLen := ArrayCountValueTop(AliveHosts, common.LiveTop, false)
|
||||||
output := fmt.Sprintf("[*] LiveTop %-16s 段存活数量为: %d", arrTop[i]+".0/24", arrLen[i])
|
for i := 0; i < len(arrTop); i++ {
|
||||||
common.LogSuccess(output)
|
output := fmt.Sprintf("[*] LiveTop %-16s 段存活数量为: %d", arrTop[i]+".0/24", arrLen[i])
|
||||||
|
common.LogSuccess(output)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return AliveHosts
|
return AliveHosts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user