func (this Scanner) Scan(target, cmd string, cred scanners.Credential, outChan chan scanners.Result) {
	opts := smb.Options{
		Host:     target,
		Port:     445,
		User:     cred.Account,
		Domain:   ".",
		Password: cred.AuthData,
	}
	if strings.Contains(target, ":") {
		targetInfo := strings.Split(target, ":")
		opts.Host = targetInfo[0]
		opts.Port, _ = strconv.Atoi(targetInfo[1])
	}
	if strings.Contains(cred.Account, "\\") {
		logonInfo := strings.Split(cred.Account, "\\")
		opts.Domain = logonInfo[0]
		opts.User = logonInfo[1]
	}
	result := scanners.Result{
		Host:    target,
		Auth:    cred,
		Message: "Successfully connected",
		Status:  true,
		Output:  "",
	}
	session, err := smb.NewSession(opts, false)
	if err != nil {
		result.Message = err.Error()
		result.Status = false
	}
	defer session.Close()
	if session.IsAuthenticated {
		result.Message = "Logon failed."
		result.Status = false
	}
	outChan <- result
}
Runs the actual scan, takes an input of our target, the creds we need to use for this one,
a command to run if we have one, and our out channel for results
package smb
import (
	"strconv"
	"strings"
	"github.com/emperorcow/go-netscan/scanners"
	"github.com/stacktitan/smb/smb"
)
type Scanner struct{}
func (this Scanner) Name() string {
	return "smb"
}
func (this Scanner) Description() string {
	return "Server Message Block (SMB)"
}
func (this Scanner) SupportedAuthentication() []string {
	return []string{"basic"}
}
func (this Scanner) SupportedAuthenticationExample() map[string]string {
	return map[string]string{
		"basic": "USERNAME,PASSWORD",
	}
}