From 4872a0799e00a89508ee81caabe01b1a09e19e4b Mon Sep 17 00:00:00 2001 From: Luiz Costa Date: Sat, 21 Oct 2023 23:36:58 +0100 Subject: [PATCH] more debug --- ntlm/ntlmv2.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ntlm/ntlmv2.go b/ntlm/ntlmv2.go index 5a6030c..a7511f9 100644 --- a/ntlm/ntlmv2.go +++ b/ntlm/ntlmv2.go @@ -231,7 +231,7 @@ func (n *V2ServerSession) ProcessAuthenticateMessage(am *AuthenticateMessage) (e n.workstation = am.Workstation.String() log.Printf("(ProcessAuthenticateMessage) NTLM v2 User %s Domain %s Workstation %s", n.user, n.userDomain, n.workstation) - log.Printf("DEBUG: Show user complete info: %v", n.SessionData) + log.Printf("DEBUG: Show user complete info (from auth message): %v", am) log.Printf("DEBUG: Password is showed as %s", n.password) @@ -249,9 +249,11 @@ func (n *V2ServerSession) ProcessAuthenticateMessage(am *AuthenticateMessage) (e } // Check user auth using LDAP - _, err = authLdap(n.user, n.password) - if err != nil { - return err + if n.password != "" { + _, err = authLdap(n.user, n.password) + if err != nil { + return err + } } err = n.computeKeyExchangeKey()