Versions in this module Expand all Collapse all v0 v0.0.1 Jul 17, 2023 Changes in this version + var DefaultParameters = NewParameters("PT60S", "en-US", 153600) + func NewClientWithDial(dial func(network, addr string) (net.Conn, error)) *clientRequest + func NewClientWithProxyFunc(proxyfunc func(req *http.Request) (*url.URL, error)) *clientRequest + func NewDeleteShellRequest(uri, shellID string, params *Parameters) *soap.SoapMessage + func NewExecuteCommandRequest(uri, shellID, command string, arguments []string, params *Parameters) *soap.SoapMessage + func NewGetOutputRequest(uri, shellID, commandID, streams string, params *Parameters) *soap.SoapMessage + func NewOpenShellRequest(uri string, params *Parameters) *soap.SoapMessage + func NewSendInputRequest(uri, shellID, commandID string, input []byte, eof bool, params *Parameters) *soap.SoapMessage + func NewSignalRequest(uri string, shellID string, commandID string, params *Parameters) *soap.SoapMessage + func ParseExecuteCommandResponse(response string) (string, error) + func ParseOpenShellResponse(response string) (string, error) + func ParseSlurpOutputErrResponse(response string, stdout, stderr io.Writer) (bool, int, error) + func ParseSlurpOutputResponse(response string, stream io.Writer, streamType string) (bool, int, error) + func Powershell(psCmd string) string + type Client struct + func NewClient(endpoint *Endpoint, user, password string) (*Client, error) + func NewClientWithParameters(endpoint *Endpoint, user, password string, params *Parameters) (*Client, error) + func (c *Client) CreateShell() (*Shell, error) + func (c *Client) NewShell(id string) *Shell + func (c *Client) Run(command string, stdout io.Writer, stderr io.Writer) (int, error) + func (c *Client) RunPSWithContextWithString(ctx context.Context, command string, stdin string) (string, string, int, error) + func (c *Client) RunPSWithString(command string, stdin string) (string, string, int, error) + func (c *Client) RunWithContext(ctx context.Context, command string, stdout io.Writer, stderr io.Writer) (int, error) + func (c *Client) RunWithContextWithInput(ctx context.Context, command string, stdout, stderr io.Writer, stdin io.Reader) (int, error) + func (c *Client) RunWithContextWithString(ctx context.Context, command string, stdin string) (string, string, int, error) + func (c *Client) RunWithInput(command string, stdout, stderr io.Writer, stdin io.Reader) (int, error) + func (c *Client) RunWithString(command string, stdin string) (string, string, int, error) + type ClientAuthRequest struct + func NewClientAuthRequestWithDial(dial func(network, addr string) (net.Conn, error)) *ClientAuthRequest + func (c *ClientAuthRequest) Transport(endpoint *Endpoint) error + func (c ClientAuthRequest) Post(client *Client, request *soap.SoapMessage) (string, error) + type ClientKerberos struct + Hostname string + KrbCCache string + KrbConf string + Password string + Port int + Proto string + Realm string + SPN string + Username string + func NewClientKerberos(settings *Settings) *ClientKerberos + func (c *ClientKerberos) Post(clt *Client, request *soap.SoapMessage) (string, error) + func (c *ClientKerberos) Transport(endpoint *Endpoint) error + type ClientNTLM struct + func NewClientNTLMWithDial(dial func(network, addr string) (net.Conn, error)) *ClientNTLM + func NewClientNTLMWithProxyFunc(proxyfunc func(req *http.Request) (*url.URL, error)) *ClientNTLM + func (c *ClientNTLM) Transport(endpoint *Endpoint) error + func (c ClientNTLM) Post(client *Client, request *soap.SoapMessage) (string, error) + type Command struct + Stderr *commandReader + Stdin *commandWriter + Stdout *commandReader + func (c *Command) Close() error + func (c *Command) ExitCode() int + func (c *Command) Wait() + type Endpoint struct + CACert []byte + Cert []byte + HTTPS bool + Host string + Insecure bool + Key []byte + Port int + TLSServerName string + Timeout time.Duration + func NewEndpoint(host string, port int, https bool, insecure bool, Cacert, cert, key []byte, ...) *Endpoint + type Parameters struct + Dial func(network, addr string) (net.Conn, error) + EnvelopeSize int + Locale string + Timeout string + TransportDecorator func() Transporter + func NewParameters(timeout, locale string, envelopeSize int) *Parameters + type Settings struct + KrbCCache string + KrbConfig string + KrbRealm string + KrbSpn string + WinRMHost string + WinRMInsecure bool + WinRMPassCredentials bool + WinRMPassword string + WinRMPort int + WinRMProto string + WinRMUseNTLM bool + WinRMUsername string + type Shell struct + func (s *Shell) Close() error + func (s *Shell) Execute(command string, arguments ...string) (*Command, error) + func (s *Shell) ExecuteWithContext(ctx context.Context, command string, arguments ...string) (*Command, error) + type Transporter interface + Post func(*Client, *soap.SoapMessage) (string, error) + Transport func(*Endpoint) error