Documentation ¶
Index ¶
- Constants
- type PipeResponse
- type ProcessesByTask
- func (s *ProcessesByTask) GetBeaconInfo() map[string]shared.TaskProcess
- func (s *ProcessesByTask) RegisterProcess(rpm *RemoteProcessManager, taskid string, devices []int)
- func (s *ProcessesByTask) StopTaskByID(taskid string)
- func (s *ProcessesByTask) UnregisterProcess(rpm *RemoteProcessManager, taskid string)
- type RemoteOutput
- type RemoteProcessManager
- func (s *RemoteProcessManager) GetMemoryRSS() uint64
- func (s *RemoteProcessManager) GetReturnCode() int
- func (s *RemoteProcessManager) GetRunningPID() int
- func (s *RemoteProcessManager) Start(process string, args ...string) (err error)
- func (s *RemoteProcessManager) StopKill()
- func (s *RemoteProcessManager) StopTerm()
- func (s *RemoteProcessManager) Wait()
- type Worker
Constants ¶
const PIDUNKN = -1
PIDUNKN stands for PID Unknown and indicates the process has not started yet (or has exited)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PipeResponse ¶
PipeResponse is the data returned from the pipe
type ProcessesByTask ¶
type ProcessesByTask struct {
// contains filtered or unexported fields
}
ProcessesByTask is a mapping of current running processes stored by their taskid
func NewProcessesByTask ¶
func NewProcessesByTask() ProcessesByTask
NewProcessesByTask creates a tracker for task processes
func (*ProcessesByTask) GetBeaconInfo ¶
func (s *ProcessesByTask) GetBeaconInfo() map[string]shared.TaskProcess
GetBeaconInfo returns information about the current running processes on this worker
func (*ProcessesByTask) RegisterProcess ¶
func (s *ProcessesByTask) RegisterProcess(rpm *RemoteProcessManager, taskid string, devices []int)
RegisterProcess registers the child process/worker which is performing the cracking session. This should be called before the process starts
func (*ProcessesByTask) StopTaskByID ¶
func (s *ProcessesByTask) StopTaskByID(taskid string)
StopTaskByID sends a SIGTERM to a running child process being monitored by the parent. If the task does not exist, nothing happens.
func (*ProcessesByTask) UnregisterProcess ¶
func (s *ProcessesByTask) UnregisterProcess(rpm *RemoteProcessManager, taskid string)
UnregisterProcess removes the child process/worker from the manager. This should be called when the process exits
type RemoteOutput ¶
type RemoteOutput chan PipeResponse
RemoteOutput is a channel on which messages from child processes pipes are sent to
type RemoteProcessManager ¶
type RemoteProcessManager struct {
// contains filtered or unexported fields
}
RemoteProcessManager is a child process of the worker which does all the heavy lifting
func NewRemoteProcess ¶
func NewRemoteProcess(ch RemoteOutput) *RemoteProcessManager
NewRemoteProcess creates a process wrapper that allows stderr/out to be recorded as well as administratively manage the process
func (*RemoteProcessManager) GetMemoryRSS ¶
func (s *RemoteProcessManager) GetMemoryRSS() uint64
GetMemoryRSS returns the resident size of the remote process. If we are unable to retrieve it, we return 0
func (*RemoteProcessManager) GetReturnCode ¶
func (s *RemoteProcessManager) GetReturnCode() int
GetReturnCode returns the return code of the process after it exits
func (*RemoteProcessManager) GetRunningPID ¶
func (s *RemoteProcessManager) GetRunningPID() int
GetRunningPID returns the current PID of the process. If the process has not started yet, the value is -1.
func (*RemoteProcessManager) Start ¶
func (s *RemoteProcessManager) Start(process string, args ...string) (err error)
Start the mule process up and wait for it to exit
func (*RemoteProcessManager) StopKill ¶
func (s *RemoteProcessManager) StopKill()
StopKill stops the mule process by sending it a SIGKILL
func (*RemoteProcessManager) StopTerm ¶
func (s *RemoteProcessManager) StopTerm()
StopTerm stops the mule process by sending it a SIGERM
func (*RemoteProcessManager) Wait ¶
func (s *RemoteProcessManager) Wait()
Wait blocks until the process has completely exited
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker is a gocrack process that beacons to a server and accepts new processing requests