Documentation ¶
Index ¶
- Variables
- func GetBoolPtr(b bool) *bool
- func GetIntPtr(i int) *int
- func GetStrPtr(s string) *string
- func GetTLSConfig(certificatePem, privateKeyPem string, caCertPem *string) (*tls.Config, error)
- func IntSliceToString(ints []int) string
- func LoadConfigFile(configPath string, cfg interface{}) (err error)
- func RecordAPIMetrics(duration prometheus.Summary, counter *prometheus.CounterVec) gin.HandlerFunc
- type Beacon
- type Device
- type DeviceMap
- type EngineVersion
- type HModeInfo
- type HashcatAttackMode
- type HashcatUserOptions
- type HumanDuration
- type ServerCfg
- type TaskProcess
Constants ¶
This section is empty.
Variables ¶
var SupportedHashcatModes = []HModeInfo{}/* 270 elements not displayed */
SupportedHashcatModes is a list of all the supported hashcat cracking SupportedHashcatModes This is manually generated and is up-to-date as of v3.40
Functions ¶
func GetTLSConfig ¶
GetTLSConfig is a helper function to return a TLS configuration that can be used in TLS servers
func IntSliceToString ¶
IntSliceToString converts a list of integers to a comma separated list
func LoadConfigFile ¶
LoadConfigFile reads configPath into cfg
func RecordAPIMetrics ¶
func RecordAPIMetrics(duration prometheus.Summary, counter *prometheus.CounterVec) gin.HandlerFunc
RecordAPIMetrics logs the duration of an API request, minus websockets as well as a summary of request partitioned by their status code and method
Types ¶
type Beacon ¶
type Beacon struct { WorkerVersion string Hostname string RequestNewTask bool Devices DeviceMap Processes map[string]TaskProcess // map[taskid]TaskProcess Engines EngineVersion }
Beacon describes the payload sent by a worker
type Device ¶
type Device struct { ID int Name string Type opencl.DeviceType IsBusy bool }
Device describes an OpenCL device on a worker
type DeviceMap ¶
DeviceMap stores OpenCL Device information by the device's unique ID. The methods attached to this are not safe for concurrent use
func (DeviceMap) HasFreeDevices ¶
HasFreeDevices indicates if we have at least one device that can accept a task
func (DeviceMap) MarkAsBusy ¶
MarkAsBusy marks devices as busy
func (DeviceMap) MarkAsFree ¶
MarkAsFree marks devices as free
func (DeviceMap) PickFreeDevices ¶
func (s DeviceMap) PickFreeDevices(deviceType opencl.DeviceType, maxNumber int) []int
PickFreeDevices returns a list of device ID's that are not marked as Busy
type EngineVersion ¶
EngineVersion is a map of the engines contained within the worker along with their engine version
type HModeInfo ¶
type HModeInfo struct { Number int `json:"mode"` Name string `json:"name"` Category string `json:"category"` Example string `json:"example,omitempty"` }
HModeInfo describes the hashcat mode
func LookupHashcatHashType ¶
LookupHashcatHashType takes a hash type integer and returns info about it if it exists
type HashcatAttackMode ¶
type HashcatAttackMode uint32
HashcatAttackMode describes the various supported password cracking attacks available in hashcat
const ( // AttackModeStraight is a dictionary attack with optional mangling rules applied AttackModeStraight HashcatAttackMode = 0 // AttackModeBruteForce is a brute force attack using a list of masks to guess the password(s) AttackModeBruteForce HashcatAttackMode = 3 )
type HashcatUserOptions ¶
type HashcatUserOptions struct { AttackMode HashcatAttackMode `json:"attack_mode"` HashType int `json:"hash_type"` Masks *string `json:"masks,omitempty"` DictionaryFile *string `json:"dictionary_file,omitempty"` ManglingRuleFile *string `json:"mangling_file,omitempty"` }
HashcatUserOptions defines the user settable options of a hashcat task
type HumanDuration ¶
HumanDuration is YAML encodable duration for configuration objects
func (HumanDuration) MarshalYAML ¶
func (s HumanDuration) MarshalYAML() (interface{}, error)
MarshalYAML implements a YAML encoder to save the human duration within a YAML file
func (*HumanDuration) UnmarshalYAML ¶
func (s *HumanDuration) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements a YAML decoder to load the duration into a time.Duration