Documentation
¶
Index ¶
- Constants
- type AgentCommands
- type AgentMetrics
- type BuildConfig
- type CommandRequest
- type CommandResponse
- type CommandStatusRequest
- type CommandStatusResponse
- type ConfigurationRequest
- type ConfigurationResponse
- type FileRequest
- type FileResponse
- type FileToServer
- type FileTransferStatusResponse
- type JWTClaim
- type KeysRequest
- type KeysResponse
- type Note
- type Payload
- type PayloadConfigurations
- type Redirector
- type RedirectorTemplateData
- type Request
- type RequestType
- type Response
- type ResponseType
- type Tag
- type TagKeyValues
- type UpdateUserRequest
- type User
- type UserCreationRequest
Constants ¶
const ( ConfigurationRequestType RequestType = "ConfigurationRequest" CommandRequestType RequestType = "CommandRequest" CommandStatusRequestType RequestType = "CommandStatusRequest" KeysRequestType RequestType = "KeysRequest" FileRequestType RequestType = "FileRequest" FileToServerType RequestType = "FileToServer" ConfigurationResponseType ResponseType = "ConfigurationResponse" CommandResponseType ResponseType = "CommandResponse" CommandStatusResponseType ResponseType = "CommandStatusResponse" KeysResponseType ResponseType = "KeysResponse" FileResponseType ResponseType = "FileResponse" FileTransferStatusResponseType ResponseType = "FileTransferStatusResponse" )
Constants for request and response types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentCommands ¶
type AgentMetrics ¶ added in v1.3.3
type BuildConfig ¶
type CommandRequest ¶
type CommandRequest struct {
AgentID string `json:"uuid"`
}
CommandRequest is sent by agent to check for commands
type CommandResponse ¶
type CommandResponse struct {
AgentID string `json:"uuid"`
CommandType string `json:"commandtype"`
CommandID string `json:"commandid"`
Command string `json:"command"`
}
CommandResponse is sent back to the agent after a CommandRequest
type CommandStatusRequest ¶
type CommandStatusRequest struct {
AgentID string `json:"uuid"`
CommandID string `json:"commandid"`
CommandResult string `json:"result"`
CommandOutput string `json:"output"`
}
CommandStatusRequest is sent by agent to tell the server the command outcome
type CommandStatusResponse ¶
type CommandStatusResponse struct {
AgentID string `json:"uuid"`
}
type ConfigurationRequest ¶
type ConfigurationRequest struct {
AgentID string `json:"uuid"`
Username string `json:"username"`
Hostname string `json:"hostname"`
OSType string `json:"ostype"`
OSArch string `json:"arch"`
OSBuild string `json:"osbuild"`
CPUS string `json:"cpus"`
MEMORY string `json:"memory"`
AgentIP string `json:"agentip"`
ServerIP string `json:"serverip"`
ServerPort string `json:"serverport"`
CallbackFrequency string `json:"callbackfrequency"`
CallbackJitter string `json:"callbackjitter"`
MasterKey string `json:"masterkey"`
Status string `json:"status"`
Tags []Tag `json:"tags"`
NextCallback time.Time `json:"nextcallback"`
}
ConfigurationRequest is sent by agent to start a callback
type ConfigurationResponse ¶
type ConfigurationResponse struct {
AgentID string `json:"uuid"`
ServerIP string `json:"serverip"`
ServerPort string `json:"serverport"`
CallbackFrequency string `json:"callbackfrequency"`
CallbackJitter string `json:"callbackjitter"`
}
ConfigurationResponse is sent back to agent after a ConfigurationRequest
type FileRequest ¶
type FileRequest struct {
AgentID string `json:"uuid"`
}
FileRequest is sent by agent to check for files
type FileResponse ¶
type FileResponse struct {
FileID string `json:"fileid"`
AgentID string `json:"uuid"`
Type string `json:"transfertype"`
Path string `json:"filepath"`
Chunk []byte `json:"chunk"`
}
FileResponse is sent back to the agent after a FileRequest. Prepares the agent for a transfer
type FileToServer ¶
type FileToServer struct {
FileID string `json:"fileid"`
AgentID string `json:"uuid"`
Type string `json:"transfertype"`
Path string `json:"path"`
Status string `json:"status"`
Chunk []byte `json:"chunk"`
}
This manages success messages if Type = download. Otherwise, send data to server
type JWTClaim ¶
type JWTClaim struct {
Username string `json:"username"`
Role string `json:"role"`
jwt.StandardClaims
}
type KeysRequest ¶
type KeysResponse ¶
type KeysResponse struct {
AgentID string `json:"uuid"`
}
type Payload ¶
type Payload struct {
PayloadID string `json:"payloadid"`
Uuid string `json:"uuid"`
Name string `json:"name"`
Description string `json:"description"`
ServerIP string `json:"serverip"`
ServerPort string `json:"serverport"`
CallbackFrequency string `json:"callbackfrequency"`
CallbackJitter string `json:"callbackjitter"`
Concat string `json:"concat"`
}
type PayloadConfigurations ¶
type PayloadConfigurations map[string]BuildConfig
type Redirector ¶
type Redirector struct {
RedirectorID string `json:"id" binding:"required"`
Name string `json:"name" binding:"required"`
Description string `json:"description" binding:"required"`
ForwardIP string `json:"forwardip"`
ForwardPort string `json:"forwardport"`
ListenIP string `json:"listenip" binding:"required"`
ListenPort string `json:"listenport" binding:"required"`
Status string `json:"status" binding:"required"`
}
type RedirectorTemplateData ¶ added in v1.3.2
type Request ¶
type Request struct {
Type RequestType
Payload interface{}
}
General Request struct with typed payload
type Response ¶
type Response struct {
Type ResponseType
Payload interface{}
}
General Response struct with typed payload
type ResponseType ¶
type ResponseType string
type TagKeyValues ¶ added in v1.3.3
type UpdateUserRequest ¶
type User ¶
type User struct {
ID int `db:"id"`
Username string `db:"username"`
PasswordHash string `db:"password_hash"`
Role string `db:"role"`
}