Merge remote-tracking branch 'au/main' into refactoring

This commit is contained in:
ph
2023-07-26 12:10:27 +03:00
11 changed files with 71 additions and 23 deletions
+3 -2
View File
@@ -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)