Documentation
¶
Overview ¶
Package exploit provides functions to parse flags from JSON output.
Package exploit provides functions to execute exploits and manage their output.
Index ¶
- Constants
- func Cleanup(pid int)
- func Create(name string) (string, error)
- func Detach()
- func List() (string, error)
- func ParseLine(line string) (models.ClientData, string, error)
- func Remove(name string) (string, error)
- func RestartGlobal()
- func Setup(detach bool) error
- func Stop(pid int) (string, error)
- func SubmitFlag(flag models.ClientData) (string, error)
- func SubmitFlags(flagsChan <-chan models.ClientData)
- func ValidateArgs(args config.ArgsAttack) error
- type ExecutionResult
- type ParsedFlagOutput
- type StatusBatchOutput
- type StreamingResult
Constants ¶
View Source
const ( INFO = "info" // Status indicating informational output EXPLOIT = "exploit_info" // Status indicating exploit-specific informational output FAILED = "failed" // Status indicating flag submission failure ERROR = "error" // Status indicating a general error in flag submission FATAL = "fatal" // Status indicating a fatal error in the exploiter SUCCESS = "success" // Status indicating successful flag submission STATS = "stats" // Status indicating a batch of statistics DEBUG = "debug" // Status indicating debug information )
Variables ¶
This section is empty.
Functions ¶
func ParseLine ¶
func ParseLine(line string) (models.ClientData, string, error)
ParseLine parses a JSON line into a Flag struct.
func RestartGlobal ¶
func RestartGlobal()
func SubmitFlag ¶
func SubmitFlag(flag models.ClientData) (string, error)
func SubmitFlags ¶
func SubmitFlags(flagsChan <-chan models.ClientData)
func ValidateArgs ¶
func ValidateArgs(args config.ArgsAttack) error
ValidateArgs validates the arguments passed to the program
Types ¶
type ExecutionResult ¶
type ExecutionResult struct { Cmd *exec.Cmd FlagsChan chan models.ClientData OutputChan chan string // contains filtered or unexported fields }
var ( GlobalResult *ExecutionResult MutexResult sync.Mutex )
func (*ExecutionResult) Shutdown ¶
func (e *ExecutionResult) Shutdown() error
Shutdown end the exploit process.
type ParsedFlagOutput ¶
type ParsedFlagOutput struct { TeamID uint16 `json:"team_id"` // ID of the team the flag was extracted from PortService uint16 `json:"port_service"` // Port of the service that produced the flag Status string `json:"status"` // Status of the flag submission (eg "success", "failed", "error", "fatal") FlagCode string `json:"flag_code"` // The actual flag string NameService string `json:"name_service"` // Human-readable name of the service Message string `json:"message"` // Additional message or error information }
ParsedFlagOutput represents the output of a parsed flag returned by an exploit run in the exploit_manager, ready to be submitted.
type StatusBatchOutput ¶
type StatusBatchOutput struct { Status string `json:"status"` // Status of the flag submission (eg "success", "failed", "error", "fatal") Message string `json:"message"` // Additional message or error information NameService string `json:"name_service"` // Human-readable name of the service PortService uint16 `json:"port_service"` // Port of the service that produced the flag TotalFlag int `json:"total_flag"` // Total flag collected in the batch SuccessTeam int `json:"success_team"` // Total number of teams from which flags were successfully extracted FailedTeam int `json:"failed_team"` // Total number of teams from which flag extraction failed }
type StreamingResult ¶
type StreamingResult struct { OutputChan chan string ErrorChan chan error ExitChan chan struct{} PID int }
StreamingResult contains the result channels for RunFuncTui
Click to show internal directories.
Click to hide internal directories.