making things more go get friendly
This commit is contained in:
parent
6e9e2ebdb3
commit
85f6623a22
@ -13,8 +13,8 @@ the client and the server, for our use we hardcoded a supported set of negotiati
|
|||||||
## Sample Usage as NTLM Client
|
## Sample Usage as NTLM Client
|
||||||
|
|
||||||
```go
|
```go
|
||||||
import "ntlm"
|
import "github.com/ThomsonReutersEikon/go-ntlm/ntlm"
|
||||||
import "ntlm/messages"
|
import "github.com/ThomsonReutersEikon/go-ntlm/ntlm/messages"
|
||||||
|
|
||||||
session = ntlm.NewClientSession(ntlm.Version1, ntlm.ConnectionlessMode)
|
session = ntlm.NewClientSession(ntlm.Version1, ntlm.ConnectionlessMode)
|
||||||
session.SetUserInfo("someuser","somepassword","somedomain")
|
session.SetUserInfo("someuser","somepassword","somedomain")
|
||||||
|
@ -7,8 +7,8 @@ import (
|
|||||||
md5P "crypto/md5"
|
md5P "crypto/md5"
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
rc4P "crypto/rc4"
|
rc4P "crypto/rc4"
|
||||||
|
md4P "github.com/ThomsonReutersEikon/go-ntlm/ntlm/md4"
|
||||||
crc32P "hash/crc32"
|
crc32P "hash/crc32"
|
||||||
md4P "ntlm/md4"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func md4(data []byte) []byte {
|
func md4(data []byte) []byte {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
package ntlm
|
package ntlm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"ntlm/messages"
|
"github.com/ThomsonReutersEikon/go-ntlm/ntlm/messages"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Define KXKEY(SessionBaseKey, LmChallengeResponse, ServerChallenge) as
|
// Define KXKEY(SessionBaseKey, LmChallengeResponse, ServerChallenge) as
|
||||||
|
@ -6,7 +6,7 @@ package ntlm
|
|||||||
import (
|
import (
|
||||||
rc4P "crypto/rc4"
|
rc4P "crypto/rc4"
|
||||||
"errors"
|
"errors"
|
||||||
"ntlm/messages"
|
"github.com/ThomsonReutersEikon/go-ntlm/ntlm/messages"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Version int
|
type Version int
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
l4g "code.google.com/p/log4go"
|
l4g "code.google.com/p/log4go"
|
||||||
rc4P "crypto/rc4"
|
rc4P "crypto/rc4"
|
||||||
"errors"
|
"errors"
|
||||||
"ntlm/messages"
|
"github.com/ThomsonReutersEikon/go-ntlm/ntlm/messages"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ package ntlm
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"ntlm/messages"
|
"github.com/ThomsonReutersEikon/go-ntlm/ntlm/messages"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
rc4P "crypto/rc4"
|
rc4P "crypto/rc4"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"errors"
|
"errors"
|
||||||
"ntlm/messages"
|
"github.com/ThomsonReutersEikon/go-ntlm/ntlm/messages"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"ntlm/messages"
|
"github.com/ThomsonReutersEikon/go-ntlm/ntlm/messages"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
"ntlm/messages"
|
"github.com/ThomsonReutersEikon/go-ntlm/ntlm/messages"
|
||||||
)
|
)
|
||||||
|
|
||||||
type NtlmsspMessageSignature struct {
|
type NtlmsspMessageSignature struct {
|
||||||
|
@ -4,7 +4,7 @@ package ntlm
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"ntlm/messages"
|
"github.com/ThomsonReutersEikon/go-ntlm/ntlm/messages"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"ntlm/messages"
|
"github.com/ThomsonReutersEikon/go-ntlm/ntlm/messages"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -3,8 +3,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"fmt"
|
"fmt"
|
||||||
"ntlm"
|
"github.com/ThomsonReutersEikon/go-ntlm/ntlm"
|
||||||
"ntlm/messages"
|
"github.com/ThomsonReutersEikon/go-ntlm/ntlm/messages"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user