Documentation ¶
Index ¶
- Constants
- Variables
- func ConnectSocket(https bool, host, port, contentpath, path, UserAgent string, ...)
- func LoginServer(https bool, username, password, host, port, contentpath string, ...) (string, error)
- type PipeLine
- type WebShellClient
- func (c *WebShellClient) GetJSON(url string) (map[string]interface{}, error)
- func (c *WebShellClient) GetRes(url string) (*http.Response, error)
- func (c *WebShellClient) GetWebsocket(url string) (*websocket.Conn, error)
- func (c *WebShellClient) Init(https bool, crt, key, rootcrt string)
- func (c *WebShellClient) Run(https bool, username, password, host, post, contentpath string)
Constants ¶
View Source
const Version = "1.0"
Version WebShell Client current version
Variables ¶
View Source
var UserAgent = fmt.Sprintf("web-shell-client/%s (%s; %s; %s)", Version, runtime.GOOS, runtime.GOARCH, runtime.Version())
UserAgent Request header[User-Agent]
Functions ¶
Types ¶
type PipeLine ¶
type PipeLine struct {
// contains filtered or unexported fields
}
PipeLine Connect websocket and childprocess
func NewPipeLine ¶
NewPipeLine Malloc PipeLine
func (*PipeLine) ReadSktAndWriteStdio ¶
ReadSktAndWriteStdio read skt and write stdout
func (*PipeLine) ReadStdioAndWriteSkt ¶
ReadStdioAndWriteSkt read stdin and write skt
type WebShellClient ¶
WebShellClient connect to WebShellServer
func (*WebShellClient) GetJSON ¶
func (c *WebShellClient) GetJSON(url string) (map[string]interface{}, error)
GetJSON http get request and parse JSON
func (*WebShellClient) GetRes ¶
func (c *WebShellClient) GetRes(url string) (*http.Response, error)
GetRes http get request
func (*WebShellClient) GetWebsocket ¶
func (c *WebShellClient) GetWebsocket(url string) (*websocket.Conn, error)
GetWebsocket get websocket connection
func (*WebShellClient) Init ¶
func (c *WebShellClient) Init(https bool, crt, key, rootcrt string)
Init http client
func (*WebShellClient) Run ¶
func (c *WebShellClient) Run(https bool, username, password, host, post, contentpath string)
Run WebShellClient
Click to show internal directories.
Click to hide internal directories.