From 121142af03a2658b1b967007c2325bd20984e9d1 Mon Sep 17 00:00:00 2001 From: Luiz Costa Date: Sun, 22 Oct 2023 15:23:42 +0100 Subject: [PATCH] tenta alterar a forma como chama e muda a ordem --- ntlm/ntlmv2.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ntlm/ntlmv2.go b/ntlm/ntlmv2.go index 5830a9b..7320344 100644 --- a/ntlm/ntlmv2.go +++ b/ntlm/ntlmv2.go @@ -245,16 +245,17 @@ func (n *V2ServerSession) ProcessAuthenticateMessage(am *AuthenticateMessage) (e return err } + log.Printf("DEBUG: challenge: %s\n", string(n.challengeMessage.ServerChallenge)) + log.Printf("DEBUG: ntChallengeResponse: %s\n", string(n.ntChallengeResponse)) + // Execute ntlm_auth to check user auth - cmd := exec.Command("ntlm_auth", "--domain="+n.userDomain, "--username="+n.user, "--challenge="+string(n.challengeMessage.ServerChallenge), "--nt-response="+string(n.ntChallengeResponse)) + cmd := exec.Command("/usr/local/bin/ntlm_auth", "--domain="+n.userDomain, "--username="+n.user, "--challenge="+string(n.challengeMessage.ServerChallenge), "--nt-response="+string(n.ntChallengeResponse)) output, err := cmd.CombinedOutput() if err != nil { fmt.Printf("Failed to execute command: %s\n", err) return } - log.Printf("DEBUG: challenge: %s\n", string(n.challengeMessage.ServerChallenge)) - log.Printf("DEBUG: ntChallengeResponse: %s\n", string(n.ntChallengeResponse)) log.Printf("ntlm_auth Output: %s\n", output) // Check user auth using LDAP