This commit is contained in:
影舞者
2023-11-13 16:23:19 +08:00
parent 6bf396d09f
commit 1c631133ad
14 changed files with 41 additions and 38 deletions
+1 -1
View File
@@ -39,11 +39,11 @@ func MS17010Scan(info *common.HostInfo) error {
ip := info.Host
// connecting to a host in LAN if reachable should be very quick
conn, err := common.WrapperTcpWithTimeout("tcp", ip+":445", time.Duration(common.Timeout)*time.Second)
defer conn.Close()
if err != nil {
//fmt.Printf("failed to connect to %s\n", ip)
return err
}
defer conn.Close()
err = conn.SetDeadline(time.Now().Add(time.Duration(common.Timeout) * time.Second))
if err != nil {
//fmt.Printf("failed to connect to %s\n", ip)