hacking up the ntlm tests to work
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
package ntlm
|
||||
|
||||
import (
|
||||
rc4P "crypto/rc4"
|
||||
"bytes"
|
||||
// l4g "code.google.com/p/log4go"
|
||||
rc4P "crypto/rc4"
|
||||
"errors"
|
||||
"fmt"
|
||||
"ntlm/messages"
|
||||
"strings"
|
||||
)
|
||||
@@ -160,6 +162,11 @@ func (n *V1ServerSession) ProcessAuthenticateMessage(am *messages.Authenticate)
|
||||
n.negotiateFlags = am.NegotiateFlags
|
||||
n.clientChallenge = am.ClientChallenge()
|
||||
n.encryptedRandomSessionKey = am.EncryptedRandomSessionKey.Payload
|
||||
// Ignore the values used in SetUserInfo and use these instead from the authenticate message
|
||||
// They should always be correct (I hope)
|
||||
n.user = am.UserName.String()
|
||||
n.userDomain = am.DomainName.String()
|
||||
fmt.Printf("(ProcessAuthenticateMessage)NTLM v1 User %s Domain %s \n", n.user, n.userDomain)
|
||||
|
||||
err = n.fetchResponseKeys()
|
||||
if err != nil {
|
||||
|
||||
@@ -177,7 +177,7 @@ func (n *V2ServerSession) ProcessAuthenticateMessage(am *messages.Authenticate)
|
||||
// They should always be correct (I hope)
|
||||
n.user = am.UserName.String()
|
||||
n.userDomain = am.DomainName.String()
|
||||
l4g.Info("NTLM User %s Domain %s", n.user, n.userDomain)
|
||||
l4g.Info("(ProcessAuthenticateMessage)NTLM v2 User %s Domain %s", n.user, n.userDomain)
|
||||
|
||||
err = n.fetchResponseKeys()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user