修改icmp发包模式,更适合大规模探测。

修改报错提示,--debug时,如果10秒内没有LogSuccess的消息,每隔10秒就会打印一下当前进度
This commit is contained in:
shadow1ng
2021-02-05 14:43:07 +08:00
parent d468986428
commit 1a8964cc6e
15 changed files with 149 additions and 121 deletions
+8 -2
View File
@@ -23,7 +23,7 @@ func WebTitle(info *common.HostInfo) (err error, result string) {
}
err, result = geturl(info)
if info.IsWebCan || err != nil {
if common.IsWebCan || err != nil {
return
}
@@ -44,9 +44,15 @@ func geturl(info *common.HostInfo) (err error, result string) {
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
DisableKeepAlives: false,
DialContext: (&net.Dialer{
Timeout: time.Duration(info.WebTimeout) * time.Second,
Timeout: time.Duration(info.WebTimeout) * time.Second,
KeepAlive: time.Duration(info.WebTimeout+3) * time.Second,
}).DialContext,
MaxIdleConns: 1000,
MaxIdleConnsPerHost: 1000,
IdleConnTimeout: time.Duration(info.WebTimeout+3) * time.Second,
TLSHandshakeTimeout: 5 * time.Second,
}
var client = &http.Client{Timeout: time.Duration(info.WebTimeout) * time.Second, Transport: tr}
res, err := http.NewRequest("GET", url, nil)
if err == nil {