Documentation
¶
Index ¶
- type Metadata
- type Session
- type SessionManager
- func (s *SessionManager) AddSession(encMetadata string, sshConn *ssh.ServerConn) (*Session, error)
- func (s *SessionManager) CountSessions() int
- func (s *SessionManager) GetSession(id string) *Session
- func (s *SessionManager) ListComments() map[string]string
- func (s *SessionManager) ListSessions() []*Session
- func (s *SessionManager) RemoveSession(session *Session)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metadata ¶
type Metadata struct {
Username string `json:"u,omitempty"`
Hostname string `json:"h,omitempty"`
Domain string `json:"d,omitempty"`
IPs []string `json:"i,omitempty"`
OSMeta string `json:"om,omitempty"`
ProcName string `json:"pn,omitempty"`
IsPriv bool `json:"ip,omitempty"`
Extra string `json:"e,omitempty"`
}
Agent metadata
type Session ¶
type Session struct {
ID string
AgentID string
CreatedAt time.Time
Metadata Metadata
RemoteAddr string
SSHConn *ssh.ServerConn
}
func NewSession ¶
func NewSession(encMetadata string, sshConn *ssh.ServerConn) (*Session, error)
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
func NewSessionManager ¶
func NewSessionManager(ctx context.Context, db *database.Database) *SessionManager
func (*SessionManager) AddSession ¶
func (s *SessionManager) AddSession(encMetadata string, sshConn *ssh.ServerConn) (*Session, error)
func (*SessionManager) CountSessions ¶
func (s *SessionManager) CountSessions() int
func (*SessionManager) GetSession ¶
func (s *SessionManager) GetSession(id string) *Session
GetSession returns session if it exists by agent ID
func (*SessionManager) ListComments ¶ added in v0.2.2
func (s *SessionManager) ListComments() map[string]string
func (*SessionManager) ListSessions ¶
func (s *SessionManager) ListSessions() []*Session
func (*SessionManager) RemoveSession ¶
func (s *SessionManager) RemoveSession(session *Session)
Click to show internal directories.
Click to hide internal directories.