Use golang's log, so we don't need log4go.
This commit is contained in:
		
							parent
							
								
									52b7efa603
								
							
						
					
					
						commit
						b00ec39bbd
					
				| @ -8,8 +8,9 @@ import ( | ||||
| 	md5P "crypto/md5" | ||||
| 	"crypto/rand" | ||||
| 	rc4P "crypto/rc4" | ||||
| 	md4P "github.com/ThomsonReutersEikon/go-ntlm/ntlm/md4" | ||||
| 	crc32P "hash/crc32" | ||||
| 
 | ||||
| 	md4P "github.com/ThomsonReutersEikon/go-ntlm/ntlm/md4" | ||||
| ) | ||||
| 
 | ||||
| func md4(data []byte) []byte { | ||||
|  | ||||
| @ -5,8 +5,8 @@ package ntlm | ||||
| import ( | ||||
| 	"bytes" | ||||
| 	"crypto/rand" | ||||
| 	"unicode/utf16" | ||||
| 	"encoding/binary" | ||||
| 	"unicode/utf16" | ||||
| ) | ||||
| 
 | ||||
| // Concatenate two byte slices into a new slice | ||||
| @ -86,4 +86,3 @@ func uint32ToBytes(v uint32) []byte { | ||||
| 	bytes[3] = byte((v >> 24) & 0xff) | ||||
| 	return bytes | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -6,7 +6,7 @@ import ( | ||||
| 	"bytes" | ||||
| 	rc4P "crypto/rc4" | ||||
| 	"errors" | ||||
| 	l4g "github.com/ThomsonReutersEikon/log4go" | ||||
| 	"log" | ||||
| 	"strings" | ||||
| ) | ||||
| 
 | ||||
| @ -181,7 +181,7 @@ func (n *V1ServerSession) ProcessAuthenticateMessage(am *AuthenticateMessage) (e | ||||
| 	// They should always be correct (I hope) | ||||
| 	n.user = am.UserName.String() | ||||
| 	n.userDomain = am.DomainName.String() | ||||
| 	l4g.Info("(ProcessAuthenticateMessage)NTLM v1 User %s Domain %s", n.user, n.userDomain) | ||||
| 	log.Printf("(ProcessAuthenticateMessage)NTLM v1 User %s Domain %s", n.user, n.userDomain) | ||||
| 
 | ||||
| 	err = n.fetchResponseKeys() | ||||
| 	if err != nil { | ||||
| @ -225,7 +225,7 @@ func (n *V1ServerSession) ProcessAuthenticateMessage(am *AuthenticateMessage) (e | ||||
| 		//UGH not entirely sure how this could possibly happen, going to put this in for now | ||||
| 		//TODO investigate if this ever is really happening | ||||
| 		am.Version = &VersionStruct{ProductMajorVersion: uint8(5), ProductMinorVersion: uint8(1), ProductBuild: uint16(2600), NTLMRevisionCurrent: uint8(15)} | ||||
| 		l4g.Error("Nil version in ntlmv1") | ||||
| 		log.Printf("Nil version in ntlmv1") | ||||
| 	} | ||||
| 
 | ||||
| 	err = n.calculateKeys(am.Version.NTLMRevisionCurrent) | ||||
|  | ||||
| @ -7,7 +7,7 @@ import ( | ||||
| 	rc4P "crypto/rc4" | ||||
| 	"encoding/binary" | ||||
| 	"errors" | ||||
| 	l4g "github.com/ThomsonReutersEikon/log4go" | ||||
| 	"log" | ||||
| 	"strings" | ||||
| 	"time" | ||||
| ) | ||||
| @ -204,7 +204,7 @@ func (n *V2ServerSession) ProcessAuthenticateMessage(am *AuthenticateMessage) (e | ||||
| 	// They should always be correct (I hope) | ||||
| 	n.user = am.UserName.String() | ||||
| 	n.userDomain = am.DomainName.String() | ||||
| 	l4g.Info("(ProcessAuthenticateMessage)NTLM v2 User %s Domain %s", n.user, n.userDomain) | ||||
| 	log.Printf("(ProcessAuthenticateMessage)NTLM v2 User %s Domain %s", n.user, n.userDomain) | ||||
| 
 | ||||
| 	err = n.fetchResponseKeys() | ||||
| 	if err != nil { | ||||
| @ -238,13 +238,12 @@ func (n *V2ServerSession) ProcessAuthenticateMessage(am *AuthenticateMessage) (e | ||||
| 		return err | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 	if am.Version == nil { | ||||
| 		//UGH not entirely sure how this could possibly happen, going to put this in for now | ||||
| 		//TODO investigate if this ever is really happening | ||||
| 		am.Version = &VersionStruct{ProductMajorVersion: uint8(5), ProductMinorVersion: uint8(1), ProductBuild: uint16(2600), NTLMRevisionCurrent: uint8(15)} | ||||
| 
 | ||||
|         l4g.Error("Nil version in ntlmv2") | ||||
| 		log.Printf("Nil version in ntlmv2") | ||||
| 	} | ||||
| 
 | ||||
| 	err = n.calculateKeys(am.Version.NTLMRevisionCurrent) | ||||
|  | ||||
| @ -4,6 +4,8 @@ import ( | ||||
| 	"encoding/base64" | ||||
| 	"flag" | ||||
| 	"fmt" | ||||
| 
 | ||||
| 	"github.com/ThomsonReutersEikon/go-ntlm/ntlm" | ||||
| ) | ||||
| 
 | ||||
| func main() { | ||||
|  | ||||
| @ -3,6 +3,7 @@ package main | ||||
| import ( | ||||
| 	"encoding/base64" | ||||
| 	"fmt" | ||||
| 
 | ||||
| 	"github.com/ThomsonReutersEikon/go-ntlm/ntlm" | ||||
| ) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user