Documentation
¶
Index ¶
- func AddPullTunnelConfig(termite *TermiteClient, local_address string, remote_address string)
- func AddPushTunnelConfig(termite *TermiteClient, local_address string, remote_address string)
- func CreateContext()
- func CreateDistributorServer(host string, port uint16, url string) *gin.Engine
- func CreateRESTfulAPIServer() *gin.Engine
- func Shutdown()
- func Signal()
- func StartSocks5Server(local_address string) error
- func TermiteMessageDispatcher(client *TermiteClient)
- func WriteTunnel(termite *TermiteClient, token string, data []byte)
- type Context
- func (ctx Context) AddServer(s *TCPServer)
- func (ctx Context) DeleteServer(s *TCPServer)
- func (ctx Context) DeleteTCPClient(c *TCPClient)
- func (ctx Context) DeleteTermiteClient(c *TermiteClient)
- func (ctx Context) FindServerByHash(hash string) *TCPServer
- func (ctx Context) FindServerListeningAddressByRouteKey(routeKey string) string
- func (ctx Context) FindTCPClientByAlias(alias string) *TCPClient
- func (ctx Context) FindTCPClientByHash(hash string) *TCPClient
- func (ctx Context) FindTermiteClientByAlias(alias string) *TermiteClient
- func (ctx Context) FindTermiteClientByHash(hash string) *TermiteClient
- type Distributor
- type Process
- type PullTunnelConfig
- type PullTunnelInstance
- type PushTunnelConfig
- type PushTunnelInstance
- type TCPClient
- func (c *TCPClient) AsTable()
- func (c *TCPClient) Close()
- func (c *TCPClient) EstablishPTY() error
- func (c *TCPClient) FileExists(path string) (bool, error)
- func (c *TCPClient) FileSize(filename string) (int, error)
- func (c *TCPClient) FullDesc() string
- func (c *TCPClient) GatherClientInfo(hashFormat string)
- func (c *TCPClient) GetConn() net.Conn
- func (c *TCPClient) GetConnString() string
- func (c *TCPClient) GetHashFormat() string
- func (c *TCPClient) GetInteractingLock() *sync.Mutex
- func (c *TCPClient) GetInteractive() bool
- func (c *TCPClient) GetPrompt() string
- func (c *TCPClient) GetPtyEstablished() bool
- func (c *TCPClient) GetShellPath() string
- func (c *TCPClient) GetUsername() string
- func (client *TCPClient) NotifyWebSocketCompilingTermite(progress int)
- func (client *TCPClient) NotifyWebSocketCompressingTermite(progress int)
- func (client *TCPClient) NotifyWebSocketUploadingTermite(bytesSent int, bytesTotal int)
- func (c *TCPClient) OnelineDesc() string
- func (c *TCPClient) Read(timeout time.Duration) (string, bool)
- func (c *TCPClient) ReadConnLock(b []byte) (int, error)
- func (c *TCPClient) ReadFile(filename string) (string, error)
- func (c *TCPClient) ReadFileEx(filename string, start int, length int) (string, error)
- func (c *TCPClient) ReadSize(size int) string
- func (c *TCPClient) ReadUntil(token string) (string, bool)
- func (c *TCPClient) ReadUntilClean(token string) string
- func (c *TCPClient) SelectPython() string
- func (c *TCPClient) SetInteractive(new bool) bool
- func (c *TCPClient) SetPtyEstablished(new bool) bool
- func (c *TCPClient) SetWindowSize(ws *WindowSize)
- func (c *TCPClient) System(command string)
- func (c *TCPClient) SystemToken(command string) string
- func (c *TCPClient) UpgradeToTermite(connectBackHostPort string)
- func (c *TCPClient) Upload(src string, dst string, broadcast bool) bool
- func (c *TCPClient) Write(data []byte) int
- type TCPServer
- func (s *TCPServer) AddTCPClient(client *TCPClient)
- func (s *TCPServer) AddTermiteClient(client *TermiteClient)
- func (s *TCPServer) AsTable()
- func (s *TCPServer) DeleteTCPClient(client *TCPClient)
- func (s *TCPServer) DeleteTermiteClient(client *TermiteClient)
- func (s *TCPServer) FullDesc() string
- func (s *TCPServer) GetAllTCPClients() map[string](*TCPClient)
- func (s *TCPServer) GetAllTermiteClients() map[string](*TermiteClient)
- func (s *TCPServer) Handle(conn net.Conn)
- func (s *TCPServer) NotifyWebSocketDuplicateTCPClient(client *TCPClient)
- func (s *TCPServer) NotifyWebSocketDuplicateTermiteClient(client *TermiteClient)
- func (s *TCPServer) NotifyWebSocketOnlineTCPClient(client *TCPClient)
- func (s *TCPServer) NotifyWebSocketOnlineTermiteClient(client *TermiteClient)
- func (s *TCPServer) OnelineDesc() string
- func (s *TCPServer) Run()
- func (s *TCPServer) Stop()
- type TermiteClient
- func (c *TermiteClient) AddProcess(key string, process *Process)
- func (c *TermiteClient) AsTable()
- func (c *TermiteClient) Close()
- func (c *TermiteClient) FileSize(path string) (int64, error)
- func (c *TermiteClient) FullDesc() string
- func (c *TermiteClient) GatherClientInfo(hashFormat string) bool
- func (c *TermiteClient) GetConn() net.Conn
- func (c *TermiteClient) GetConnString() string
- func (c *TermiteClient) GetHashFormat() string
- func (c *TermiteClient) GetPrompt() string
- func (c *TermiteClient) GetShellPath() string
- func (c *TermiteClient) GetUsername() string
- func (c *TermiteClient) InteractWith(key string)
- func (c *TermiteClient) LockAtom()
- func (c *TermiteClient) LockDecoder()
- func (c *TermiteClient) LockEncoder()
- func (c *TermiteClient) NotifyGoportingWindowSize(columns int, rows int)
- func (c *TermiteClient) OnelineDesc() string
- func (c *TermiteClient) ReadFile(path string) ([]byte, error)
- func (c *TermiteClient) ReadFileEx(path string, start int64, size int64) ([]byte, error)
- func (c *TermiteClient) Recv(msg *message.Message) error
- func (c *TermiteClient) RequestStartProcess(path string, columns int, rows int, key string)
- func (c *TermiteClient) RequestTerminate(key string)
- func (c *TermiteClient) Send(message message.Message) error
- func (c *TermiteClient) StartShell()
- func (c *TermiteClient) StartSocks5Server()
- func (c *TermiteClient) System(command string) string
- func (c *TermiteClient) UnlockAtom()
- func (c *TermiteClient) UnlockDecoder()
- func (c *TermiteClient) UnlockEncoder()
- func (c *TermiteClient) WriteFile(path string, content []byte) (int, error)
- func (c *TermiteClient) WriteFileEx(path string, content []byte) (int, error)
- type WebSocketMessage
- type WebSocketMessageType
- type WindowSize
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPullTunnelConfig ¶
func AddPullTunnelConfig(termite *TermiteClient, local_address string, remote_address string)
func AddPushTunnelConfig ¶
func AddPushTunnelConfig(termite *TermiteClient, local_address string, remote_address string)
func CreateContext ¶
func CreateContext()
func CreateDistributorServer ¶
func CreateRESTfulAPIServer ¶
func StartSocks5Server ¶
func TermiteMessageDispatcher ¶
func TermiteMessageDispatcher(client *TermiteClient)
func WriteTunnel ¶
func WriteTunnel(termite *TermiteClient, token string, data []byte)
Types ¶
type Context ¶
type Context struct {
Servers map[string](*TCPServer)
NotifyWebSocket *melody.Melody
Current *TCPClient
CurrentTermite *TermiteClient
CommandPrompt string
RLInstance *readline.Instance
Interacting *sync.Mutex
PullTunnelConfig map[string]PullTunnelConfig
PullTunnelInstance map[string]PullTunnelInstance
PushTunnelConfig map[string]PushTunnelConfig
PushTunnelInstance map[string]PushTunnelInstance
Socks5Servers map[string](*socks5.Server)
MessageQueue map[string](chan message.Message)
// Set later in goporting.go
Distributor *Distributor
RESTful *gin.Engine
Config *config.Config
}
var Ctx *Context
func GetContext ¶
func GetContext() *Context
func (Context) DeleteServer ¶
func (Context) DeleteTCPClient ¶
func (Context) DeleteTermiteClient ¶
func (ctx Context) DeleteTermiteClient(c *TermiteClient)
func (Context) FindServerByHash ¶
func (Context) FindServerListeningAddressByRouteKey ¶
func (Context) FindTCPClientByAlias ¶
func (Context) FindTCPClientByHash ¶
func (Context) FindTermiteClientByAlias ¶
func (ctx Context) FindTermiteClientByAlias(alias string) *TermiteClient
func (Context) FindTermiteClientByHash ¶
func (ctx Context) FindTermiteClientByHash(hash string) *TermiteClient
type Distributor ¶
type PullTunnelConfig ¶
type PullTunnelConfig struct {
Termite *TermiteClient
Address string
Server *net.Listener
}
type PullTunnelInstance ¶
type PullTunnelInstance struct {
Termite *TermiteClient
Conn *net.Conn
}
type PushTunnelConfig ¶
type PushTunnelConfig struct {
Termite *TermiteClient
Address string
}
type PushTunnelInstance ¶
type PushTunnelInstance struct {
Termite *TermiteClient
Conn *net.Conn
}
type TCPClient ¶
type TCPClient struct {
GroupDispatch bool `json:"group_dispatch"`
Hash string `json:"hash"`
Host string `json:"host"`
Port uint16 `json:"port"`
Alias string `json:"alias"`
User string `json:"user"`
OS oss.OperatingSystem `json:"os"`
NetworkInterfaces map[string]string `json:"network_interfaces"`
Python2 string `json:"python2"`
Python3 string `json:"python3"`
TimeStamp time.Time `json:"timestamp"`
// contains filtered or unexported fields
}
func (*TCPClient) EstablishPTY ¶
func (*TCPClient) GatherClientInfo ¶
func (*TCPClient) GetConnString ¶
func (*TCPClient) GetHashFormat ¶
func (*TCPClient) GetInteractingLock ¶
func (*TCPClient) GetInteractive ¶
func (*TCPClient) GetPtyEstablished ¶
func (*TCPClient) GetShellPath ¶
func (*TCPClient) GetUsername ¶
func (*TCPClient) NotifyWebSocketCompilingTermite ¶
func (*TCPClient) NotifyWebSocketCompressingTermite ¶
func (*TCPClient) NotifyWebSocketUploadingTermite ¶
func (*TCPClient) OnelineDesc ¶
func (*TCPClient) ReadFileEx ¶
func (*TCPClient) ReadUntilClean ¶
func (*TCPClient) SelectPython ¶
func (*TCPClient) SetInteractive ¶
func (*TCPClient) SetPtyEstablished ¶
func (*TCPClient) SetWindowSize ¶
func (c *TCPClient) SetWindowSize(ws *WindowSize)
func (*TCPClient) SystemToken ¶
func (*TCPClient) UpgradeToTermite ¶
type TCPServer ¶
type TCPServer struct {
Host string `json:"host"`
GroupDispatch bool `json:"group_dispatch"`
Port uint16 `json:"port"`
Clients map[string](*TCPClient) `json:"clients"`
TermiteClients map[string](*TermiteClient) `json:"termite_clients"`
TimeStamp time.Time `json:"timestamp"`
Interfaces []string `json:"interfaces"`
Hash string `json:"hash"`
Encrypted bool `json:"encrypted"`
DisableHistory bool `json:"disable_history"`
PublicIP string `json:"public_ip"`
ShellPath string `json:"shell_path"`
// contains filtered or unexported fields
}
func CreateTCPServer ¶
func (*TCPServer) AddTCPClient ¶
func (*TCPServer) AddTermiteClient ¶
func (s *TCPServer) AddTermiteClient(client *TermiteClient)
Encrypted clients
func (*TCPServer) DeleteTCPClient ¶
func (*TCPServer) DeleteTermiteClient ¶
func (s *TCPServer) DeleteTermiteClient(client *TermiteClient)
func (*TCPServer) GetAllTCPClients ¶
func (*TCPServer) GetAllTermiteClients ¶
func (s *TCPServer) GetAllTermiteClients() map[string](*TermiteClient)
func (*TCPServer) NotifyWebSocketDuplicateTCPClient ¶
func (*TCPServer) NotifyWebSocketDuplicateTermiteClient ¶
func (s *TCPServer) NotifyWebSocketDuplicateTermiteClient(client *TermiteClient)
func (*TCPServer) NotifyWebSocketOnlineTCPClient ¶
func (*TCPServer) NotifyWebSocketOnlineTermiteClient ¶
func (s *TCPServer) NotifyWebSocketOnlineTermiteClient(client *TermiteClient)
func (*TCPServer) OnelineDesc ¶
type TermiteClient ¶
type TermiteClient struct {
Hash string `json:"hash"`
Host string `json:"host"`
Port uint16 `json:"port"`
Alias string `json:"alias"`
User string `json:"user"`
OS oss.OperatingSystem `json:"os"`
Version string `json:"version"`
NetworkInterfaces map[string]string `json:"network_interfaces"`
Python2 string `json:"python2"`
Python3 string `json:"python3"`
TimeStamp time.Time `json:"timestamp"`
DisableHistory bool `json:"disable_hisory"`
GroupDispatch bool `json:"group_dispatch"`
// contains filtered or unexported fields
}
func CreateTermiteClient ¶
func CreateTermiteClient(conn net.Conn, server *TCPServer, disableHistory bool) *TermiteClient
func (*TermiteClient) AddProcess ¶
func (c *TermiteClient) AddProcess(key string, process *Process)
func (*TermiteClient) AsTable ¶
func (c *TermiteClient) AsTable()
func (*TermiteClient) Close ¶
func (c *TermiteClient) Close()
func (*TermiteClient) FullDesc ¶
func (c *TermiteClient) FullDesc() string
func (*TermiteClient) GatherClientInfo ¶
func (c *TermiteClient) GatherClientInfo(hashFormat string) bool
func (*TermiteClient) GetConn ¶
func (c *TermiteClient) GetConn() net.Conn
func (*TermiteClient) GetConnString ¶
func (c *TermiteClient) GetConnString() string
func (*TermiteClient) GetHashFormat ¶
func (c *TermiteClient) GetHashFormat() string
func (*TermiteClient) GetPrompt ¶
func (c *TermiteClient) GetPrompt() string
func (*TermiteClient) GetShellPath ¶
func (c *TermiteClient) GetShellPath() string
func (*TermiteClient) GetUsername ¶
func (c *TermiteClient) GetUsername() string
func (*TermiteClient) InteractWith ¶
func (c *TermiteClient) InteractWith(key string)
func (*TermiteClient) LockAtom ¶
func (c *TermiteClient) LockAtom()
func (*TermiteClient) LockDecoder ¶
func (c *TermiteClient) LockDecoder()
func (*TermiteClient) LockEncoder ¶
func (c *TermiteClient) LockEncoder()
func (*TermiteClient) NotifyGoportingWindowSize ¶
func (c *TermiteClient) NotifyGoportingWindowSize(columns int, rows int)
func (*TermiteClient) OnelineDesc ¶
func (c *TermiteClient) OnelineDesc() string
func (*TermiteClient) ReadFileEx ¶
func (*TermiteClient) RequestStartProcess ¶
func (c *TermiteClient) RequestStartProcess(path string, columns int, rows int, key string)
func (*TermiteClient) RequestTerminate ¶
func (c *TermiteClient) RequestTerminate(key string)
func (*TermiteClient) StartShell ¶
func (c *TermiteClient) StartShell()
func (*TermiteClient) StartSocks5Server ¶
func (c *TermiteClient) StartSocks5Server()
func (*TermiteClient) System ¶
func (c *TermiteClient) System(command string) string
func (*TermiteClient) UnlockAtom ¶
func (c *TermiteClient) UnlockAtom()
func (*TermiteClient) UnlockDecoder ¶
func (c *TermiteClient) UnlockDecoder()
func (*TermiteClient) UnlockEncoder ¶
func (c *TermiteClient) UnlockEncoder()
func (*TermiteClient) WriteFile ¶
func (c *TermiteClient) WriteFile(path string, content []byte) (int, error)
func (*TermiteClient) WriteFileEx ¶
func (c *TermiteClient) WriteFileEx(path string, content []byte) (int, error)
type WebSocketMessage ¶
type WebSocketMessage struct {
Type WebSocketMessageType
Data interface{}
}
type WebSocketMessageType ¶
type WebSocketMessageType int
const ( CLIENT_CONNECTED WebSocketMessageType = iota CLIENT_DUPLICATED SERVER_DUPLICATED COMPILING_TERMITE COMPRESSING_TERMITE UPLOADING_TERMITE )
type WindowSize ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.