Skip to content

NTLM Transporter for the masterzen's Go WinRM client

License

Notifications You must be signed in to change notification settings

dpotapov/winrm-auth-ntlm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

winrm-auth-ntlm

NTLM Transporter for the masterzen's Go WinRM client.

Comparing to original NTLM implementation, the package allows domain user authentication.

Installation:

go get github.com/dpotapov/winrm-auth-ntlm

Usage:

endpoint := winrm.NewEndpoint(*host, *port, false, false, nil, nil, nil, 0)

winrm.DefaultParameters.TransportDecorator = func() winrm.Transporter {
    return &winrmntlm.Transport{
        Username: *user,
        Password: *pswd,
    }
}

// Note, username/password pair in the NewClientWithParameters call is ignored
client, err := winrm.NewClientWithParameters(endpoint, "", "", winrm.DefaultParameters)
if err != nil {
    panic(err)
}

_, err = client.Run(flag.Arg(0), os.Stdout, os.Stderr)
if err != nil {
    panic(err)
}

Please check the full example in the example directory.

About

NTLM Transporter for the masterzen's Go WinRM client

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages