Documentation
¶
Index ¶
- Variables
- type ActiveTarget
- type Logger
- type Observer
- type ServerStatus
- func (s *ServerStatus) AddCallback(task *clientpb.Task, callback TaskCallback)
- func (s *ServerStatus) AddDoneCallback(task *clientpb.Task, callback TaskCallback)
- func (s *ServerStatus) AddObserver(session *Session) string
- func (s *ServerStatus) AlivedSessions() []*clientpb.Session
- func (s *ServerStatus) CallbackOutput(event *clientpb.Event, finish bool)
- func (s *ServerStatus) EventHandler()
- func (s *ServerStatus) ObserverLog(sessionId string) *Logger
- func (s *ServerStatus) RemoveObserver(observerID string)
- func (s *ServerStatus) UpdateSession(sid string) (*clientpb.Session, error)
- func (s *ServerStatus) UpdateSessions(all bool) error
- func (s *ServerStatus) UpdateTasks(session *Session) error
- type Session
- func (s *Session) Console(task *clientpb.Task, msg string)
- func (s *Session) Context() context.Context
- func (s *Session) Error(task *clientpb.Task, err error)
- func (s *Session) GetAddon(name string) *implantpb.Addon
- func (s *Session) HasAddon(addon string) bool
- func (s *Session) HasDepend(module string) bool
- func (s *Session) HasTask(taskId uint32) bool
- type TaskCallback
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFoundTask = errors.New("task not found") ErrDisableOutput = errors.New("output disabled") )
Functions ¶
This section is empty.
Types ¶
type ActiveTarget ¶
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() *Session
GetSessionInteractive - Get the active target(s)
func (*ActiveTarget) GetInteractive ¶
func (s *ActiveTarget) GetInteractive() *Session
func (*ActiveTarget) Set ¶
func (s *ActiveTarget) Set(session *Session)
Set - Change the active session
type ServerStatus ¶
type ServerStatus struct {
Rpc clientrpc.MaliceRPCClient
Info *clientpb.Basic
Client *clientpb.Client
*ActiveTarget
Clients []*clientpb.Client
Listeners []*clientpb.Listener
Sessions map[string]*Session
Observers map[string]*Observer
// contains filtered or unexported fields
}
func InitServerStatus ¶
func InitServerStatus(conn *grpc.ClientConn, config *mtls.ClientConfig) (*ServerStatus, error)
func (*ServerStatus) AddCallback ¶
func (s *ServerStatus) AddCallback(task *clientpb.Task, callback TaskCallback)
func (*ServerStatus) AddDoneCallback ¶
func (s *ServerStatus) AddDoneCallback(task *clientpb.Task, callback TaskCallback)
func (*ServerStatus) AddObserver ¶
func (s *ServerStatus) AddObserver(session *Session) string
func (*ServerStatus) AlivedSessions ¶
func (s *ServerStatus) AlivedSessions() []*clientpb.Session
func (*ServerStatus) CallbackOutput ¶
func (s *ServerStatus) CallbackOutput(event *clientpb.Event, finish bool)
func (*ServerStatus) EventHandler ¶
func (s *ServerStatus) EventHandler()
func (*ServerStatus) ObserverLog ¶
func (s *ServerStatus) ObserverLog(sessionId string) *Logger
func (*ServerStatus) RemoveObserver ¶
func (s *ServerStatus) RemoveObserver(observerID string)
func (*ServerStatus) UpdateSession ¶
func (s *ServerStatus) UpdateSession(sid string) (*clientpb.Session, error)
func (*ServerStatus) UpdateSessions ¶
func (s *ServerStatus) UpdateSessions(all bool) error
func (*ServerStatus) UpdateTasks ¶
func (s *ServerStatus) UpdateTasks(session *Session) error
type Session ¶
type Session struct {
*clientpb.Session
Server *ServerStatus
}
func NewSession ¶
func NewSession(sess *clientpb.Session, server *ServerStatus) *Session
type TaskCallback ¶
Click to show internal directories.
Click to hide internal directories.