mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-25 20:51:52 +08:00
Merge remote-tracking branch 'au/main' into refactoring
This commit is contained in:
+3
-2
@@ -10,6 +10,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/shadow1ng/fscan/common"
|
||||
"golang.org/x/net/icmp"
|
||||
)
|
||||
@@ -29,9 +30,9 @@ func CheckLive(hostslist []string, ping bool, liveTop int) []string {
|
||||
ExistHosts[ip] = struct{}{}
|
||||
if !common.Silent {
|
||||
if !ping {
|
||||
fmt.Printf("(icmp) Target %-15s is alive\n", ip)
|
||||
color.Green("(icmp) Target %-15s is alive\n", ip)
|
||||
} else {
|
||||
fmt.Printf("(ping) Target %-15s is alive\n", ip)
|
||||
color.Green("(ping) Target %-15s is alive\n", ip)
|
||||
}
|
||||
}
|
||||
AliveHosts = append(AliveHosts, ip)
|
||||
|
||||
Reference in New Issue
Block a user