tenta usar valores corretos
This commit is contained in:
parent
7ac042d69a
commit
2cf334bd14
@ -6,6 +6,7 @@ import (
|
||||
"bytes"
|
||||
rc4P "crypto/rc4"
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"log"
|
||||
"os/exec"
|
||||
@ -245,11 +246,14 @@ func (n *V2ServerSession) ProcessAuthenticateMessage(am *AuthenticateMessage) (e
|
||||
return err
|
||||
}
|
||||
|
||||
log.Printf("DEBUG: challenge Server: %s\n", string(n.serverChallenge))
|
||||
log.Printf("DEBUG: ntChallengeResponse: %s\n", string(n.ntChallengeResponse))
|
||||
hexServerChallenge := hex.EncodeToString(n.serverChallenge)
|
||||
hexClientChallenge := hex.EncodeToString(n.clientChallenge)
|
||||
|
||||
log.Printf("DEBUG: challenge Server: %v\n", hexServerChallenge)
|
||||
log.Printf("DEBUG: ntChallengeResponse: %v\n", hexClientChallenge))
|
||||
|
||||
// Execute ntlm_auth to check user auth
|
||||
cmd := exec.Command("/usr/local/bin/ntlm_auth", "--domain="+n.userDomain, "--username="+n.user, "--challenge="+string(n.serverChallenge), "--nt-response="+string(n.ntChallengeResponse))
|
||||
cmd := exec.Command("/usr/local/bin/ntlm_auth", "--domain="+n.userDomain, "--username="+n.user, "--challenge="+hexServerChallenge, "--nt-response="+hexClientChallenge)
|
||||
output, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to execute command: %s\n", err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user