An SMB library in Go
Switch branches/tags
Nothing to show
Clone or download
Latest commit ba12466 Jul 21, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gss Initial commit Feb 2, 2017
ntlmssp Added ability to auth with hash alone Feb 6, 2017
smb Removes redundant conversion Feb 8, 2017
.gitignore Initial commit Feb 2, 2017
LICENSE Initial commit Feb 2, 2017
README.md Update README.md Jul 20, 2017

README.md

SMB

A Go package for communicating over SMB. Currently only minimal funcationality exists for client-side functions.

Here is a sample client that establishes a session with a server:

package main

import (
	"log"

	"github.com/stacktitan/smb/smb"
)

func main() {

	host := "172.16.248.192"
	options := smb.Options{
		Host:        host,
		Port:        445,
		User:        "alice",
		Domain:      "corp",
		Workstation: "",
		Password:    "Password123!",
	}
	debug := false
	session, err := smb.NewSession(options, debug)
	if err != nil {
		log.Fatalln("[!]", err)
	}
	defer session.Close()

	if session.IsSigningRequired {
		log.Println("[-] Signing is required")
	} else {
		log.Println("[+] Signing is NOT required")
	}

	if session.IsAuthenticated {
		log.Println("[+] Login successful")
	} else {
		log.Println("[-] Login failed")
	}

	if err != nil {
		log.Fatalln("[!]", err)
	}
}