Documentation ¶
Index ¶
- Variables
- func CloseAllConnections(obj Connection)
- func CreateTunnel(remoteHost string, remotePort string, username string, password string) int
- func GetFileSFTP(conn *sftp.Client, localPath string, remotePath string) bool
- func GetFileSMB(session *smb2.Session, localPath string, remotePath string, remoteDisk string) bool
- func InitInsecureWinRMShell(username string, password string, ipAddress string, port string) (*winrm.Client, error)
- func InitShellWithCertificate(username string, certificate string, hostname string, port string) (*ssh.Client, error)
- func InitShellWithPassword(username string, password string, hostname string, port string) (*ssh.Client, error)
- func InitWinRMShell(username string, password string, ipAddress string, port string) (*winrm.Client, error)
- func OpenSFTPConnection(conn *ssh.Client) *sftp.Client
- func OpenSMBConnection(ipAddress string, username string, password string) (*smb2.Session, error)
- func PutFileSFTP(conn *sftp.Client, localPath string, remotePath string) bool
- func PutFileSMB(session *smb2.Session, localPath string, remotePath string, remoteDisk string) bool
- func VerifyAuth(username string, password string, ipAddress string, port string, ...) bool
- func VerifyInsecureWinRM(username string, password string, ipAddress string, port string) bool
- func VerifySSH(username string, password string, ipAddress string, port string) bool
- func VerifySSHCertificate(username string, certificate string, ipAddress string, port string) bool
- func VerifyWinRM(username string, password string, ipAddress string, port string) bool
- type Connection
- func (val *Connection) CreateFileConnection(userID string, serverID string, IPAddress string) bool
- func (val *Connection) CreateShell(userID string, serverID string, IPAddress string) bool
- func (val *Connection) CreateShellRaw(connectionType string, username string, password string, IPAddress string, ...) bool
- func (val Connection) Get(localPath string, remotePath string) bool
- func (val Connection) Put(localPath string, remotePath string) bool
- func (val Connection) Run(command string) string
- type Tunnel
Constants ¶
This section is empty.
Variables ¶
var ActiveConnections map[string]Connection
ActiveConnections Active Connections
var ActiveTunnels map[string]Tunnel
ActiveTunnels ActiveTunnels
Functions ¶
func CloseAllConnections ¶
func CloseAllConnections(obj Connection)
CloseAllConnections CloseAllConnections
func CreateTunnel ¶
CreateTunnel CreateTunnel
func GetFileSFTP ¶
GetFileSFTP Send file
func GetFileSMB ¶
GetFileSMB GetFileSMB
func InitInsecureWinRMShell ¶
func InitInsecureWinRMShell(username string, password string, ipAddress string, port string) (*winrm.Client, error)
InitInsecureWinRMShell InitInsecureWinRMShell
func InitShellWithCertificate ¶
func InitShellWithCertificate(username string, certificate string, hostname string, port string) (*ssh.Client, error)
InitShellWithCertificate Initialize shell with certificate
func InitShellWithPassword ¶
func InitShellWithPassword(username string, password string, hostname string, port string) (*ssh.Client, error)
InitShellWithPassword Initialize shell
func InitWinRMShell ¶
func InitWinRMShell(username string, password string, ipAddress string, port string) (*winrm.Client, error)
InitWinRMShell InitWinRMShell
func OpenSFTPConnection ¶
OpenSFTPConnection Open SFTP connection through active shell
func OpenSMBConnection ¶
OpenSMBConnection OpenSMBConnection
func PutFileSFTP ¶
PutFileSFTP Send file
func PutFileSMB ¶
PutFileSMB PutFileSMB
func VerifyAuth ¶
func VerifyAuth(username string, password string, ipAddress string, port string, keyType string) bool
VerifyAuth VerifyAuth
func VerifyInsecureWinRM ¶
VerifyInsecureWinRM VerifyInsecureWinRM
func VerifySSHCertificate ¶
VerifySSHCertificate VerifySSHCertificate
Types ¶
type Connection ¶
type Connection struct { SSH *ssh.Client SSHSession *ssh.Client SFTP *sftp.Client SMB *smb2.Session WinRM *winrm.Client LastConnection time.Time WindowsLetter string WindowsPath string IpAddr string Port string // contains filtered or unexported fields }
Connection Connection Struct
func GetConnection ¶
func GetConnection(userID string, serverID string, IPAddress string) (*Connection, error)
GetConnection GetConnection
func (*Connection) CreateFileConnection ¶
func (val *Connection) CreateFileConnection(userID string, serverID string, IPAddress string) bool
CreateFileConnection CreateFileConnection
func (*Connection) CreateShell ¶
func (val *Connection) CreateShell(userID string, serverID string, IPAddress string) bool
CreateShell CreateShell
func (*Connection) CreateShellRaw ¶
func (val *Connection) CreateShellRaw(connectionType string, username string, password string, IPAddress string, keyPort string) bool
CreateShellRaw CreateShellRaw