mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-25 12:41:53 +08:00
fix bug
This commit is contained in:
+3
-1
@@ -218,6 +218,9 @@ func GetProtocol(host string, Timeout int64) (protocol string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
socksconn, err := common.WrapperTcpWithTimeout("tcp", host, time.Duration(Timeout) * time.Second)
|
socksconn, err := common.WrapperTcpWithTimeout("tcp", host, time.Duration(Timeout) * time.Second)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
conn := tls.Client(socksconn, &tls.Config{InsecureSkipVerify: true})
|
conn := tls.Client(socksconn, &tls.Config{InsecureSkipVerify: true})
|
||||||
defer func() {
|
defer func() {
|
||||||
if conn != nil {
|
if conn != nil {
|
||||||
@@ -229,7 +232,6 @@ func GetProtocol(host string, Timeout int64) (protocol string) {
|
|||||||
conn.Close()
|
conn.Close()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if err == nil || strings.Contains(err.Error(), "handshake failure") {
|
if err == nil || strings.Contains(err.Error(), "handshake failure") {
|
||||||
protocol = "https"
|
protocol = "https"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user