Update 1.8.3

This commit is contained in:
影舞者
2023-11-13 12:42:02 +08:00
parent 7f7ae9dc65
commit 6bf396d09f
24 changed files with 420 additions and 124 deletions
+3 -7
View File
@@ -67,11 +67,7 @@ func SmbScan2(info *common.HostInfo) (tmperr error) {
func Smb2Con(info *common.HostInfo, user string, pass string, hash []byte, hasprint bool) (flag bool, err error, flag2 bool) {
conn, err := net.DialTimeout("tcp", info.Host+":445", time.Duration(common.Timeout)*time.Second)
defer func() {
if conn != nil {
conn.Close()
}
}()
defer conn.Close()
if err != nil {
return
}
@@ -100,9 +96,9 @@ func Smb2Con(info *common.HostInfo, user string, pass string, hash []byte, haspr
if !hasprint {
var result string
if common.Domain != "" {
result = fmt.Sprintf("[*] SMB2-shares:%v:%v:%v\\%v ", info.Host, info.Ports, common.Domain, user)
result = fmt.Sprintf("[*] SMB2-shares %v:%v:%v\\%v ", info.Host, info.Ports, common.Domain, user)
} else {
result = fmt.Sprintf("[*] SMB2-shares:%v:%v:%v ", info.Host, info.Ports, user)
result = fmt.Sprintf("[*] SMB2-shares %v:%v:%v ", info.Host, info.Ports, user)
}
if len(hash) > 0 {
result += "hash: " + common.Hash