func (this Scanner) Scan(target, cmd string, cred scanners.Credential, outChan chan scanners.Result) {
	var err error
	if !strings.Contains(target, ":") {
		target = target + ":135"
	}
	var userdomain, username, userpassword, userhash string
	if strings.Contains(cred.Account, "\\") {
		logonInfo := strings.Split(cred.Account, "\\")
		userdomain = logonInfo[0]
		username = logonInfo[1]
	} else {
		username = cred.Account
	}
	if strings.Contains(cred.AuthData, ",") {
		credz := strings.Split(cred.AuthData, ",")
		userpassword = credz[0]
		userhash = credz[1]
	}
	result := scanners.Result{
		Host:    target,
		Auth:    cred,
		Message: "Successfully connected",
		Status:  true,
		Output:  "",
	}
	cfg, err := wmiexec.NewExecConfig(username, userpassword, userhash, userdomain, target, RandHostName(), true, nil, nil)
	if err != nil {
		result.Output = "Config Error: " + err.Error()
	}
	cfgIn := &cfg
	execer := wmiexec.NewExecer(cfgIn)
	err = execer.Connect()
	if err != nil {
		result.Output = "Connect Error: " + err.Error()
	}
	err = execer.Auth()
	if err != nil {
		result.Output = "Authentication Error: " + err.Error()
	}
	if cmd != "" {
		err = execer.RPCConnect()
		if err != nil {
			result.Output = "RPC Error: " + err.Error()
		}
		err = execer.Exec(cmd)
		if err != nil {
			result.Output = "Execution Error: " + err.Error()
		}
	}
	result.Output = "Execution Success"
	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 wmi
import (
	"math/rand"
	"strings"
	"time"
	"github.com/C-Sto/goWMIExec/pkg/wmiexec"
	"github.com/emperorcow/go-netscan/scanners"
)
type Scanner struct{}
func (this Scanner) Name() string {
	return "wmi"
}
func (this Scanner) Description() string {
	return "Windows Management Instrumentation (WMI)"
}
func (this Scanner) SupportedAuthentication() []string {
	return []string{"basic"}
}
func (this Scanner) SupportedAuthenticationExample() map[string]string {
	return map[string]string{
		"basic": "USERNAME,PASSWORD,HASH",
	}
}