Documentation
¶
Index ¶
- Variables
- func Start(bindCmds ...BindCmds) error
- type ActiveTarget
- type BindCmds
- type Client
- type Console
- func (c *Console) AddAliasCommand(cmd *grumble.Command)
- func (c *Console) AddExtensionCommand(cmd *grumble.Command)
- func (c *Console) AddObserver(session *clientpb.Session) string
- func (c *Console) DisableImplantCommands()
- func (c *Console) EnableImplantCommands()
- func (c *Console) GetInteractive() *clientpb.Session
- func (c *Console) Login(config *mtls.ClientConfig) error
- func (c *Console) RefreshActiveSession()
- func (c *Console) RemoveObserver(observerID string)
- func (c *Console) SessionLog(sid string) *logs.Logger
- func (c *Console) UpdatePrompt()
- type Listener
- type Observer
- type ServerStatus
- func (s *ServerStatus) AddCallback(taskId uint32, callback TaskCallback)
- func (s *ServerStatus) CancelCallback(taskId uint32)
- func (s *ServerStatus) EventHandler()
- func (s *ServerStatus) UpdateSession(sid string) error
- func (s *ServerStatus) UpdateSessions(all bool) error
- func (s *ServerStatus) UpdateTasks(session *clientpb.Session) error
- type TaskCallback
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type ActiveTarget ¶
type ActiveTarget struct {
// contains filtered or unexported fields
}
func (*ActiveTarget) Background ¶
func (s *ActiveTarget) Background()
Background - Background the active session
func (*ActiveTarget) Context ¶
func (s *ActiveTarget) Context() context.Context
func (*ActiveTarget) Get ¶
func (s *ActiveTarget) Get() *clientpb.Session
GetSessionInteractive - Get the active target(s)
func (*ActiveTarget) GetInteractive ¶
func (s *ActiveTarget) GetInteractive() *clientpb.Session
func (*ActiveTarget) Set ¶
func (s *ActiveTarget) Set(session *clientpb.Session)
Set - Change the active session
type BindCmds ¶
type BindCmds func(console *Console)
BindCmds - Bind extra commands to the app object
type Console ¶
type Console struct {
App *grumble.App
ActiveTarget *ActiveTarget
Settings *assets.Settings
Callbacks *sync.Map
Observers map[string]*Observer
*ServerStatus
}
func (*Console) AddAliasCommand ¶
func (*Console) AddExtensionCommand ¶
func (*Console) AddObserver ¶
AddObserver - Observers to notify when the active session changes
func (*Console) DisableImplantCommands ¶
func (c *Console) DisableImplantCommands()
func (*Console) EnableImplantCommands ¶
func (c *Console) EnableImplantCommands()
func (*Console) GetInteractive ¶
func (*Console) RefreshActiveSession ¶
func (c *Console) RefreshActiveSession()
func (*Console) RemoveObserver ¶
func (*Console) UpdatePrompt ¶
func (c *Console) UpdatePrompt()
type Observer ¶
type Observer struct {
// contains filtered or unexported fields
}
Observer - A function to call when the sessions changes
func NewObserver ¶
type ServerStatus ¶
type ServerStatus struct {
Rpc clientrpc.MaliceRPCClient
Info *clientpb.Basic
Clients []*Client
Listeners []*Listener
Sessions map[string]*clientpb.Session
Callbacks *sync.Map
Alive bool
}
func InitServerStatus ¶
func InitServerStatus(conn *grpc.ClientConn) (*ServerStatus, error)
func (*ServerStatus) AddCallback ¶
func (s *ServerStatus) AddCallback(taskId uint32, callback TaskCallback)
func (*ServerStatus) CancelCallback ¶
func (s *ServerStatus) CancelCallback(taskId uint32)
func (*ServerStatus) EventHandler ¶
func (s *ServerStatus) EventHandler()
func (*ServerStatus) UpdateSession ¶
func (s *ServerStatus) UpdateSession(sid string) error
func (*ServerStatus) UpdateSessions ¶
func (s *ServerStatus) UpdateSessions(all bool) error
func (*ServerStatus) UpdateTasks ¶
func (s *ServerStatus) UpdateTasks(session *clientpb.Session) error
type TaskCallback ¶
Click to show internal directories.
Click to hide internal directories.