hook

package module
v0.0.1-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

README

hook

自定义hook库

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Host      string       `json:"host"`      // 服务器IP或者域名
	Port      int          `json:"port"`      // 服务器端口
	UserName  string       `json:"username"`  // 用户名
	Password  string       `json:"password"`  // 如果使用id_rsa登录,即为私钥密码,反之则是登录用户密码
	IdRsaPath string       `json:"IdRsaPath"` // id_rsa 路径 如:./id_rsa
	Session   *ssh.Session // 服务器session
}

func (*Server) ExecCmd

func (server *Server) ExecCmd(cmd string) ([]byte, error)

*

  • 服务器执行命令
  • BaZhang Platform
  • @Author Jacklin@shouyiren.net
  • @DateTime 2021-11-06T10:48:22+0800
  • @param {[type]} server *Server) ExecCmd(cmd string) ([]byte, error [description]
  • @return {[type]} [执行结果,错误信息]

func (*Server) GetSession

func (server *Server) GetSession(cipherList []string) (*ssh.Session, error)

*

  • 获取服务器Session
  • BaZhang Platform
  • @Author Jacklin@shouyiren.net
  • @DateTime 2021-11-05T16:07:06+0800
  • @param {[type]} server *Server) GetSession(cipherList []string) (*ssh.Session, error [过程中错误]
  • @return {[type]} [返回服务器Session]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL