Documentation ¶
Overview ¶
Package command provides the common interface for all commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCommand ¶
func RegisterCommand(cmd Command)
RegisterCommand registers a command for use by the implant.
This is typically done immediately after declaring the command to make it easy to create the list of available commands at compile time for the target OS.
Types ¶
type Command ¶
type Command interface { // Name is the name of the command, what will appear in the help // documentation, and what the operator will type to run the command. Name() string // Run performs the command's operation. Run(clientID string, jobID string, args []string) (string, error) }
The Command interface provides a common interface for commands, simplifying the process of providing cross-platform and OS-specific commands.
func GetCommand ¶
GetCommand returns the command with the given name or nil if it hasn't been registered or otherwise doesn't exist.
Click to show internal directories.
Click to hide internal directories.