SMB2/3 client library written in Go.
hirochachacha/graphql-auto-transformer 23
A custom transformer of the amplify-cli. It can control accessibility of auto generated fields.
Lua 5.3 implementation (WIP)
u16suzu/Reading-The-RSpec-Book 3
Reading The RSpec Book in English at Geekhouse Musashi-Kosugi
experimental UI for google/pprof
A CLI toolchain for simplifying serverless web and mobile development.
hirochachacha/amplify-console 0
AWS Amplify Console - Hosting for fullstack serverless web apps
My personalized version of bpython. It's not for general purpose
Impacket is a collection of Python classes for working with network protocols.
fork in 8 days
pull request commenthirochachacha/go-smb2
Support for older go versions.
👍
comment created time in 11 days
push eventhirochachacha/go-smb2
commit sha 80c4a8aa0f7afa0a919c6bf8ea40fab9c7fb58db
Support for older go versions.
commit sha fec9fc65e30344dc232dd74c42ca3e69134222bf
Merge pull request #38 from mertcelen/master Support for older go versions.
push time in 11 days
PR merged hirochachacha/go-smb2
Hello
I've just updated very simple string replace function to support older versions of go. Should be supported generally, I've tested with 1.11 which is in stable repository of Debian 10.
pr closed time in 11 days
push eventhirochachacha/fileknock
commit sha e5a5a796032d033a529d35b8ec78f23e532ed5a0
feat: support fetch retry
push time in 20 days
issue commenthirochachacha/go-smb2
this is a error,when i download a file. how can I fix it ?
Never mind. In any case, solution wasn't hard.
comment created time in a month
push eventhirochachacha/go-smb2
commit sha ab8de331e002fa38f373c4d19a2b4e119f6083af
fix: Chmod and Remove
commit sha e14a2c5c2f06e9f1f22c57e6092d9452a294f1ad
fix: handle async response packet Fixes #37
push time in a month
issue closedhirochachacha/go-smb2
this is a error,when i download a file. how can I fix it ?
2020/08/30 15:59:04 read onecloud\tddownload\Train.to.Busan.2.Peninsula.2020.KOREAN.1080p.WEBRip.DD5.1.x264-CM\Train.to.Busan.2.Peninsula.2020.KOREAN.1080p.WEBRip .DD5.1.x264-CM.mkv: invalid response error: expected tree id: 124982927, got 0
maybe is same reason for func ListSharenames
panic: listSharenames srvsvc: invalid response error: expected tree id: 1300213661, got 0
closed time in a month
carlyeissue commenthirochachacha/go-smb2
this is a error,when i download a file. how can I fix it ?
Hello, what's your server? Windows 10? Today I learned that windows 10 sometimes responds with async packet even though request is sync packet, crazy. I want to know whether this is standard behavior. Also, if possible, could you give me a packet capture? So that I can confirm this issue.
comment created time in a month
issue commenthirochachacha/go-smb2
feature request: add server version detection
I don't know how to detect OS in smb2. I just googled it, and it seems to me that nmap currently doesn't support OS detection in smb2.
It has get_os function for smb1. https://github.com/nmap/nmap/blob/ccdb81655208383fe5144bffcd77edf4f47c4bd0/nselib/smb.lua#L3383
But I couldn't find similar functionality for smb2. https://github.com/nmap/nmap/blob/ccdb81655208383fe5144bffcd77edf4f47c4bd0/nselib/smb2.lua
comment created time in a month
push eventhirochachacha/go-smb2
commit sha 519ee96f0898ad20c1cb4935bec646ab106929b4
fix: Remove and RemoveAll
push time in 2 months
push eventhirochachacha/go-smb2
commit sha fee5c0b12b4bd2cb1736ff4bd701d8af35f9030b
test: add TestServerSideCopy
push time in 2 months
push eventhirochachacha/go-smb2
commit sha f91dd85786354fdf51113e41bb77da0f2a862fe7
feat: change API signatures for v1.0.0 * remove IsXXX * remove MultipleError * add ContextError This change allows users to use os.IsXXX instead. * remove File.WithContext File starts to use underlying filesystem's context. Therefore should use Share.WithContext instead. * change DialContext's param order context should be the first parameter. * rename ListShareNames to ListSharenames
push time in 2 months
push eventhirochachacha/go-smb2
commit sha d52fca3c32e57996bdfc5788c1ac504876a49f9c
feat: change API signatures for v1.0.0 * remove IsXXX * remove MultipleError * add ContextError This change allows users to use os.IsXXX instead. * remove File.WithContext File starts to use underlying filesystem's context. Therefore should use Share.WithContext instead. * change DialContext's param order context should be the first parameter.
push time in 2 months
push eventhirochachacha/go-smb2
commit sha 6569ee9e2547186eadde5cc7686551107183ec9e
feat: collection * refactor type names * refactor utf16 handling * replace '/' automatically * add ListShareNames method * fix guest login flow * simplify Mount path * add examples Fixes #17
commit sha 49b4666820c53707890c12e3275ccdb46daaf9f9
Merge pull request #35 from hirochachacha/feat/list_share_name feat: collection
push time in 2 months
PR merged hirochachacha/go-smb2
- refactor type names
- refactor utf16 handling
- replace '/' automatically
- add ListShareNames method
- fix guest login flow
- simplify Mount path
- add examples
Fixes #17
pr closed time in 2 months
issue closedhirochachacha/go-smb2
Hey, How can I list files in a directory with Readdir() if I have a share entered by a user? What i'm really wondering and I have been trying to figure out how can I create a pointer for the type *RemoteFile in order to use other functions?
closed time in 2 months
Pch12PR opened hirochachacha/go-smb2
- refactor type names
- refactor utf16 handling
- replace '/' automatically
- add ListShareNames method
- fix guest login flow
- simplify Mount path
- add examples
Fixes #17
pr created time in 2 months
push eventhirochachacha/go-smb2
commit sha 6569ee9e2547186eadde5cc7686551107183ec9e
feat: collection * refactor type names * refactor utf16 handling * replace '/' automatically * add ListShareNames method * fix guest login flow * simplify Mount path * add examples Fixes #17
push time in 2 months
push eventhirochachacha/go-smb2
commit sha a3f24eceafd23e154b66d348e49ac18ec8b89cf7
feat: collection * refactor type names * refactor utf16 handling * replace '/' automatically * add ListShareNames method * fix guest login flow * simplify Mount path * add examples Fixes #17
push time in 2 months
push eventhirochachacha/go-smb2
commit sha e20fef4fa9d9ed61d46efba38b0e77bd4a274c4c
fadsf0
push time in 2 months
push eventhirochachacha/go-smb2
commit sha 7fc907cf6602872b5e0f43e90f6a557ad0fe8c06
fdasf
push time in 2 months
push eventhirochachacha/go-smb2
commit sha d0e806ddbac57bea9dc82698225a94d030f793f7
fadsf
push time in 2 months
push eventhirochachacha/go-smb2
commit sha c51bd6c99dd0a218741c9a00cd77f667e20e1e5b
fdsf
push time in 2 months
push eventhirochachacha/go-smb2
commit sha 5736f8e83222768ee74daf8c7a33394654098a12
fdasf
push time in 2 months
Pull request review commenthirochachacha/go-smb2
Fixing ASN.1 BER decryption when connecting to cDOT SMB server
func DecodeNegTokenResp(bs []byte) (*NegTokenResp, error) { _, err := asn1.UnmarshalWithParams(bs, &resp, "explicit,tag:1") if err != nil {- return nil, err+ _, err = ber.UnmarshalWithParams(bs, &resp, "explicit,tag:1")
I don't know much about LDAP, but we're trying to change SPNEGO code. So let's focus on it.
According to https://tools.ietf.org/html/rfc4178:
- DER encoding is required.
Therefore, if some SMB server responds with BER encoding on SPNEGO protocol, that's probably a bug. That being said, I'm fine with making this library permissive to accept those responses. But still I want some test code.
To be clear, what I'm asking is following data. If it contains sensitive data, you can give me a redacted version.
Will that action be prohibited by the company? Sorry for the repeated request.

comment created time in 2 months
Pull request review commenthirochachacha/go-smb2
Fixing ASN.1 BER decryption when connecting to cDOT SMB server
func DecodeNegTokenResp(bs []byte) (*NegTokenResp, error) { _, err := asn1.UnmarshalWithParams(bs, &resp, "explicit,tag:1") if err != nil {- return nil, err+ _, err = ber.UnmarshalWithParams(bs, &resp, "explicit,tag:1")
Thank you for the explanation. But honestly I can't understand connection between SPNEGO and certificates. Since we're dealing with de/serialization, an unit test with real data is decisive.
comment created time in 2 months
Pull request review commenthirochachacha/go-smb2
Fixing ASN.1 BER decryption when connecting to cDOT SMB server
func DecodeNegTokenResp(bs []byte) (*NegTokenResp, error) { _, err := asn1.UnmarshalWithParams(bs, &resp, "explicit,tag:1") if err != nil {- return nil, err+ _, err = ber.UnmarshalWithParams(bs, &resp, "explicit,tag:1")
I saw the comment on testing as well, but since NetApp is a proprietary, licensed tool, I have no way of adding some tests; you would just have to believe me it works.
Hmm, how do you found out that cDot is using BER encoding? I couldn't find any references.
Is it difficult to get a packet capture? I don't think NegTokenResp contains sensitive data.
comment created time in 2 months
Pull request review commenthirochachacha/go-smb2
Fixing ASN.1 BER decryption when connecting to cDOT SMB server
func DecodeNegTokenResp(bs []byte) (*NegTokenResp, error) { _, err := asn1.UnmarshalWithParams(bs, &resp, "explicit,tag:1") if err != nil {- return nil, err+ _, err = ber.UnmarshalWithParams(bs, &resp, "explicit,tag:1")
DER encoding is restricted version of BER encoding, in other words, BER decoder should be able to decode DER encoding. So, instead of this, simple substitution maybe work:
s/asn1\.Unmarshal/ber.Unmarshal/g
I guess?
comment created time in 2 months
pull request commenthirochachacha/go-smb2
add NTLM Target Info; return broken session with error
Sorry for the late reply. I'm still unsure of the right approach here. Because I want to provide hight-level abstraction in this library, I don't want to reveal whole low-level properties. If the main purpose is improving error messages, we might want to consider extending error structures rather than adding new API.
comment created time in 2 months
pull request commenthirochachacha/go-smb2
Fixing ASN.1 BER decryption when connecting to cDOT SMB server
Thank you. That sounds good to me. Could you add test code?
comment created time in 2 months
issue closedhirochachacha/go-smb2
Mac OS: invalid response error: asn1: structure error: superfluous leading zeros in length
Hi
platform: macos
I am getting this error
panic: invalid response error: asn1: structure error: superfluous leading zeros in length
code is pasted below
I am interested in the filename.
closed time in 2 months
kshetty1990issue commenthirochachacha/go-smb2
Mac OS: invalid response error: asn1: structure error: superfluous leading zeros in length
I couldn't reproduce the exact same error message, but I think following code is culprit.
fs, err := c.Mount(`\\<IP>\<path>\<folder1>\<folder2>\<filename>`)
if err != nil {
panic(err) // panic here
}
The mount path should be a valid UNC root path like \\<server>\<share>. You can't specify <folder> and <filename>
If that's not your case, please let me know, so I'll reopen this.
comment created time in 2 months
push eventhirochachacha/go-smb2
commit sha f1939d78dcb176277dfcf89504e41e777e9cd639
chore: improve validation for mount path
push time in 2 months
issue closedhirochachacha/go-smb2
Mac OS con.Mount(`\\ip\dir`) have ERR :unverified packet returned
GO version:
go version go1.13.8 darwin/amd64
OS version:
MacOS 10.15.6
show me code:
conn, err := net.Dial("tcp", "192.168.1.200:445")
if err != nil {
panic(err)
}
defer conn.Close()
d := &smb2.Dialer{
Initiator: &smb2.NTLMInitiator{
User: "Guest",
},
}
c, err := d.Dial(conn)
if err != nil {
panic(err)
}
defer c.Logoff()
fs, err := c.Mount(`\\192.168.1.200`)
if err != nil {
panic(err)
}
defer fs.Umount()
console
panic: invalid response error: unverified packet returned
goroutine 1 [running]:
main.main()
/Users/<USER>/go/src/sbm/main/main.go:28 +0x3e5
Help,,,,,,How do I need to correct it???
closed time in 2 months
lttoissue commenthirochachacha/go-smb2
Mac OS con.Mount(`\\ip\dir`) have ERR :unverified packet returned
You cannot mount your host directly. You have to specify share name.
fs, err := c.Mount(`\\<host>\<share>`)
comment created time in 2 months
issue closedhirochachacha/go-smb2
Function ReadFile() tries to read a local file.
I am experimenting with the library and found that the ReadFile function tries to read a local file instead of the file of the remote server. Should the call in client.go::618 os.Open(filename) be changed to fs.Open(filename) ?
When I changed it locally, I could read remote files in one go as I suspect this is what the call are suppose to do.
closed time in 2 months
joshartmanpull request commenthirochachacha/go-smb2
BUGFIX: ReadFile should read from the RemoteFileSystem
Thank you!
comment created time in 2 months
push eventhirochachacha/go-smb2
commit sha b383ac235036f5b8b7a8baed579dfa13c7aa7988
BUGFIX: ReadFile should read from the RemoteFileSystem
commit sha 739edc24f0f40ed447b0a2735c2a5675a0e97824
Merge pull request #33 from AlyssaDaemon/read_file_fix BUGFIX: ReadFile should read from the RemoteFileSystem
push time in 2 months
PR merged hirochachacha/go-smb2
PR to address #32
Changes the ReadFile function to read from fs / RemoteFileSystem instead of the local filesystem.
pr closed time in 2 months