Skip to content

Commit 607bcb5

Browse files
committed
migrate import paths
1 parent bb3d59a commit 607bcb5

27 files changed

+54
-49
lines changed

README.md

+15-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
smb2
1+
Fork: github.com/hirochachacha/go-smb2
22
====
33

4-
[![Build Status](https://github.com/hirochachacha/go-smb2/actions/workflows/go.yml/badge.svg)](https://github.com/hirochachacha/go-smb2/actions/workflows/go.yml)
5-
[![Go Reference](https://pkg.go.dev/badge/github.com/hirochachacha/go-smb2.svg)](https://pkg.go.dev/github.com/hirochachacha/go-smb2)
4+
Fork Updates
5+
-------
6+
7+
* fix: skip `STATUS_PENDING` errors from signature verification;
8+
9+
* add `use_message_encryption` flag to negotiator;
10+
11+
* make Initiator interface public;
612

713
Description
814
-----------
@@ -12,12 +18,12 @@ SMB2/3 client implementation.
1218
Installation
1319
------------
1420

15-
`go get github.com/hirochachacha/go-smb2`
21+
`go get github.com/oiweiwei/go-smb2.fork`
1622

1723
Documentation
1824
-------------
1925

20-
http://godoc.org/github.com/hirochachacha/go-smb2
26+
http://godoc.org/github.com/oiweiwei/go-smb2.fork
2127

2228
Examples
2329
--------
@@ -31,7 +37,7 @@ import (
3137
"fmt"
3238
"net"
3339

34-
"github.com/hirochachacha/go-smb2"
40+
"github.com/oiweiwei/go-smb2.fork"
3541
)
3642

3743
func main() {
@@ -75,7 +81,7 @@ import (
7581
"io/ioutil"
7682
"net"
7783

78-
"github.com/hirochachacha/go-smb2"
84+
"github.com/oiweiwei/go-smb2.fork"
7985
)
8086

8187
func main() {
@@ -141,7 +147,7 @@ import (
141147
"net"
142148
"os"
143149

144-
"github.com/hirochachacha/go-smb2"
150+
"github.com/oiweiwei/go-smb2.fork"
145151
)
146152

147153
func main() {
@@ -198,7 +204,7 @@ import (
198204
"net"
199205
iofs "io/fs"
200206

201-
"github.com/hirochachacha/go-smb2"
207+
"github.com/oiweiwei/go-smb2.fork"
202208
)
203209

204210
func main() {

client.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import (
1313
"sync"
1414
"time"
1515

16-
. "github.com/hirochachacha/go-smb2/internal/erref"
17-
. "github.com/hirochachacha/go-smb2/internal/smb2"
16+
. "github.com/oiweiwei/go-smb2.fork/internal/erref"
17+
. "github.com/oiweiwei/go-smb2.fork/internal/smb2"
1818

19-
"github.com/hirochachacha/go-smb2/internal/msrpc"
19+
"github.com/oiweiwei/go-smb2.fork/internal/msrpc"
2020
)
2121

2222
// Dialer contains options for func (*Dialer) Dial.

client_fs.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build go1.16
12
// +build go1.16
23

34
package smb2

conn.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
"sync/atomic"
1111
"time"
1212

13-
. "github.com/hirochachacha/go-smb2/internal/erref"
14-
. "github.com/hirochachacha/go-smb2/internal/smb2"
13+
. "github.com/oiweiwei/go-smb2.fork/internal/erref"
14+
. "github.com/oiweiwei/go-smb2.fork/internal/smb2"
1515
)
1616

1717
// Negotiator contains options for func (*Dialer) Dial.

errors.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"fmt"
66

7-
. "github.com/hirochachacha/go-smb2/internal/erref"
7+
. "github.com/oiweiwei/go-smb2.fork/internal/erref"
88
)
99

1010
// TransportError represents a error come from net.Conn layer.

example_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"io/ioutil"
77
"net"
88

9-
"github.com/hirochachacha/go-smb2"
9+
"github.com/oiweiwei/go-smb2.fork"
1010
)
1111

1212
func Example() {

feature.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package smb2
22

33
import (
4-
. "github.com/hirochachacha/go-smb2/internal/smb2"
4+
. "github.com/oiweiwei/go-smb2.fork/internal/smb2"
55
)
66

77
// client

filepath.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import (
3939
"strings"
4040
"unicode/utf8"
4141

42-
. "github.com/hirochachacha/go-smb2/internal/erref"
42+
. "github.com/oiweiwei/go-smb2.fork/internal/erref"
4343
)
4444

4545
// ErrBadPattern indicates a pattern was malformed.

go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
module github.com/hirochachacha/go-smb2
1+
module github.com/oiweiwei/go-smb2.fork
22

3-
go 1.12
3+
go 1.21.5
44

55
require (
66
github.com/geoffgarside/ber v1.1.0
7-
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de
7+
golang.org/x/crypto v0.31.0
88
)

go.sum

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
github.com/geoffgarside/ber v1.1.0 h1:qTmFG4jJbwiSzSXoNJeHcOprVzZ8Ulde2Rrrifu5U9w=
22
github.com/geoffgarside/ber v1.1.0/go.mod h1:jVPKeCbj6MvQZhwLYsGwaGI52oUorHoHKNecGT85ZCc=
3-
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
4-
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de h1:ikNHVSjEfnvz6sxdSPCaPt572qowuyMDMJLLm3Db3ig=
5-
golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
6-
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
7-
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
8-
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
9-
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
3+
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
4+
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=

initiator.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package smb2
33
import (
44
"encoding/asn1"
55

6-
"github.com/hirochachacha/go-smb2/internal/ntlm"
7-
"github.com/hirochachacha/go-smb2/internal/spnego"
6+
"github.com/oiweiwei/go-smb2.fork/internal/ntlm"
7+
"github.com/oiweiwei/go-smb2.fork/internal/spnego"
88
)
99

1010
type Initiator interface {

internal/msrpc/msrpc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"encoding/binary"
55
"encoding/hex"
66

7-
"github.com/hirochachacha/go-smb2/internal/utf16le"
7+
"github.com/oiweiwei/go-smb2.fork/internal/utf16le"
88
)
99

1010
var le = binary.LittleEndian

internal/ntlm/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"strings"
1212
"time"
1313

14-
"github.com/hirochachacha/go-smb2/internal/utf16le"
14+
"github.com/oiweiwei/go-smb2.fork/internal/utf16le"
1515
)
1616

1717
// NTLM v2 client

internal/ntlm/ntlm_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
"testing"
1111

12-
"github.com/hirochachacha/go-smb2/internal/utf16le"
12+
"github.com/oiweiwei/go-smb2.fork/internal/utf16le"
1313
)
1414

1515
func TestNtowfv2(t *testing.T) {

internal/ntlm/server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"errors"
1010
"strings"
1111

12-
"github.com/hirochachacha/go-smb2/internal/utf16le"
12+
"github.com/oiweiwei/go-smb2.fork/internal/utf16le"
1313
)
1414

1515
// NTLM v2 server

internal/ntlm/session.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"crypto/rc4"
66
"errors"
77

8-
"github.com/hirochachacha/go-smb2/internal/utf16le"
8+
"github.com/oiweiwei/go-smb2.fork/internal/utf16le"
99
)
1010

1111
type Session struct {

internal/smb2/const.go

+2
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ const (
160160
const (
161161
AES128CCM = 1 << iota
162162
AES128GCM
163+
AES256CCM
164+
AES256GCM
163165
)
164166

165167
// ----------------------------------------------------------------------------

internal/smb2/fscc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
package smb2
44

55
import (
6-
"github.com/hirochachacha/go-smb2/internal/utf16le"
6+
"github.com/oiweiwei/go-smb2.fork/internal/utf16le"
77
)
88

99
const (

internal/smb2/request.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package smb2
22

3-
import "github.com/hirochachacha/go-smb2/internal/utf16le"
3+
import "github.com/oiweiwei/go-smb2.fork/internal/utf16le"
44

55
// ----------------------------------------------------------------------------
66
// SMB2 NEGOTIATE Request Packet

internal/smb2/response.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package smb2
22

3-
import "github.com/hirochachacha/go-smb2/internal/utf16le"
3+
import "github.com/oiweiwei/go-smb2.fork/internal/utf16le"
44

55
// ----------------------------------------------------------------------------
66
// SMB2 Error Response

internal/spnego/spnego_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ var testDecodeNegTokenResp = []struct {
6363
},
6464
},
6565
{
66-
"a182000b30820007a08200030a0100", // ber encoding (see https://github.com/hirochachacha/go-smb2/pull/34)
66+
"a182000b30820007a08200030a0100", // ber encoding (see https://github.com/oiweiwei/go-smb2.fork/pull/34)
6767
"",
6868
&NegTokenResp{
6969
NegState: 0,

session.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import (
1212
"fmt"
1313
"hash"
1414

15-
"github.com/hirochachacha/go-smb2/internal/crypto/ccm"
16-
"github.com/hirochachacha/go-smb2/internal/crypto/cmac"
17-
"github.com/hirochachacha/go-smb2/internal/spnego"
15+
"github.com/oiweiwei/go-smb2.fork/internal/crypto/ccm"
16+
"github.com/oiweiwei/go-smb2.fork/internal/crypto/cmac"
17+
"github.com/oiweiwei/go-smb2.fork/internal/spnego"
1818

19-
. "github.com/hirochachacha/go-smb2/internal/erref"
20-
. "github.com/hirochachacha/go-smb2/internal/smb2"
19+
. "github.com/oiweiwei/go-smb2.fork/internal/erref"
20+
. "github.com/oiweiwei/go-smb2.fork/internal/smb2"
2121
)
2222

2323
func sessionSetup(conn *conn, i Initiator, ctx context.Context) (*session, error) {

sign_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"crypto/aes"
66
"encoding/hex"
77

8-
"github.com/hirochachacha/go-smb2/internal/crypto/cmac"
8+
"github.com/oiweiwei/go-smb2.fork/internal/crypto/cmac"
99

10-
. "github.com/hirochachacha/go-smb2/internal/smb2"
10+
. "github.com/oiweiwei/go-smb2.fork/internal/smb2"
1111

1212
"testing"
1313
)

smb2_fs_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build go1.16
12
// +build go1.16
23

34
package smb2_test

smb2_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"strings"
1717
"time"
1818

19-
"github.com/hirochachacha/go-smb2"
19+
"github.com/oiweiwei/go-smb2.fork"
2020

2121
"testing"
2222
)

spnego.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package smb2
33
import (
44
"encoding/asn1"
55

6-
"github.com/hirochachacha/go-smb2/internal/spnego"
6+
"github.com/oiweiwei/go-smb2.fork/internal/spnego"
77
)
88

99
type spnegoClient struct {

tree_conn.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"fmt"
66

7-
. "github.com/hirochachacha/go-smb2/internal/smb2"
7+
. "github.com/oiweiwei/go-smb2.fork/internal/smb2"
88
)
99

1010
type treeConn struct {

0 commit comments

Comments
 (0)