Skip to content

Commit 4908720

Browse files
committed
socks代理时,自动-np
1 parent 9856964 commit 4908720

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

Plugins/scanner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func Scan(info common.HostInfo) {
2323
web := strconv.Itoa(common.PORTList["web"])
2424
ms17010 := strconv.Itoa(common.PORTList["ms17010"])
2525
if len(Hosts) > 0 || len(common.HostPort) > 0 {
26-
if common.IsPing == false && len(Hosts) > 0 {
26+
if common.NoPing == false && len(Hosts) > 0 {
2727
Hosts = CheckLive(Hosts, common.Ping)
2828
fmt.Println("[*] Icmp alive hosts len is:", len(Hosts))
2929
}

common/Parse.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ func ParseInput(Info *HostInfo) {
175175
}
176176
if Socks5Proxy != "" && !strings.HasPrefix(Socks5Proxy, "socks5://") {
177177
Socks5Proxy = "socks5://" + Socks5Proxy
178+
NoPing = true
178179
}
179180
}
180181

common/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ var (
6969
WebTimeout int64
7070
TmpOutputfile string
7171
TmpSave bool
72-
IsPing bool
72+
NoPing bool
7373
Ping bool
7474
Pocinfo PocInfo
7575
IsWebCan bool

common/flag.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func Flag(Info *HostInfo) {
6262
flag.BoolVar(&IsWebCan, "nopoc", false, "not to scan web vul")
6363
flag.BoolVar(&IsBrute, "nobr", false, "not to Brute password")
6464
flag.IntVar(&BruteThread, "br", 1, "Brute threads")
65-
flag.BoolVar(&IsPing, "np", false, "not to ping")
65+
flag.BoolVar(&NoPing, "np", false, "not to ping")
6666
flag.BoolVar(&Ping, "ping", false, "using ping replace icmp")
6767
flag.StringVar(&TmpOutputfile, "o", "result.txt", "Outputfile")
6868
flag.BoolVar(&TmpSave, "no", false, "not to save output log")

0 commit comments

Comments
 (0)