From 15cdc19097acb086a1a5ad7d9c59fd2359ef0c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BD=B1=E8=88=9E=E8=80=85?= Date: Wed, 15 Nov 2023 10:40:17 +0800 Subject: [PATCH] Update --- Plugins/scanner.go | 2 +- WebScan/lib/client.go | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Plugins/scanner.go b/Plugins/scanner.go index 1873b46..dcf2b1b 100644 --- a/Plugins/scanner.go +++ b/Plugins/scanner.go @@ -17,7 +17,7 @@ func Scan(info common.HostInfo) { fmt.Println("len(hosts)==0", err) return } - lib.Inithttp(common.Pocinfo) + lib.Inithttp() var ch = make(chan struct{}, common.Threads) var wg = sync.WaitGroup{} web := strconv.Itoa(common.PORTList["web"]) diff --git a/WebScan/lib/client.go b/WebScan/lib/client.go index a4d443f..7bdb0c8 100644 --- a/WebScan/lib/client.go +++ b/WebScan/lib/client.go @@ -25,8 +25,14 @@ var ( keepAlive = 5 * time.Second ) -func Inithttp(PocInfo common.PocInfo) { - //PocInfo.Proxy = "http://127.0.0.1:8080" +func Inithttp() { + //common.Proxy = "http://127.0.0.1:8080" + if common.PocNum == 0 { + common.PocNum = 20 + } + if common.WebTimeout == 0 { + common.WebTimeout = 5 + } err := InitHttpClient(common.PocNum, common.Proxy, time.Duration(common.WebTimeout)*time.Second) if err != nil { log.Fatal(err)