Documentation
¶
Index ¶
- Constants
- Variables
- func MarshalJSON(v interface{}) []byte
- func MarshalJSONS(v interface{}) string
- func NewFilePath(path string) string
- type App
- func (a *App) BindUI()
- func (a *App) Bundle() error
- func (a *App) Clean() error
- func (a *App) DeleteTask(taskID string) error
- func (a *App) ExportConfig(config interface{}) (path string, err error)
- func (a *App) Init() error
- func (a *App) LoadSettings() error
- func (a *App) LoadUI() error
- func (a *App) NewServer() error
- func (a *App) NewTask(args HashcatArgs, priority int64) (err error)
- func (a *App) NewUI() error
- func (a *App) NewWatcher() error
- func (a *App) RestoreTask(restoreFile RestoreFile) (err error)
- func (a *App) RestoreTasks() (err error)
- func (a *App) RestrictUI()
- func (a *App) SaveHash(hash []byte, filename string) (path string, err error)
- func (a *App) SaveSettings() error
- func (a *App) Scan() (err error)
- func (a *App) ScanDictionaries() (err error)
- func (a *App) ScanHashes() (err error)
- func (a *App) ScanMasks() (err error)
- func (a *App) ScanRules() (err error)
- func (a *App) StartNextTask()
- func (a *App) TaskExists(taskID string) bool
- type Hashcat
- type HashcatArgs
- type HashcatAttackMode
- type HashcatHashMode
- type Restore
- type RestoreFile
- type Settings
- type Task
- type TaskUpdate
Constants ¶
const MaxRecursiveFileWalk = 1000
const RestoreFileExt = ".restore"
Variables ¶
var DefaultSessionID = "hashcat"
var DefaultSettings = &Settings{ mu: new(sync.Mutex), Language: "en", }
var (
Version string = "dev"
)
Functions ¶
func MarshalJSON ¶ added in v1.0.0
func MarshalJSON(v interface{}) []byte
func MarshalJSONS ¶ added in v1.0.0
func MarshalJSONS(v interface{}) string
func NewFilePath ¶ added in v1.1.0
Types ¶
type App ¶ added in v1.0.0
type App struct {
Server net.Listener
UI lorca.UI
Watcher *fsnotify.Watcher
Dir string
HashcatDir string
HashesDir string
DictionariesDir string
RulesDir string
MasksDir string
ExportedDir string
Hashcat *Hashcat
Hashes []string
Dictionaries []string
Rules []string
Masks []string
Tasks map[string]*Task
TaskAddCallback func(TaskUpdate)
TaskUpdateCallback func(TaskUpdate)
TaskPreProcessCallback func(TaskUpdate)
TaskPostProcessCallback func(TaskUpdate)
TaskDeleteCallback func(string)
WatcherHashcatCallback func()
WatcherHashesCallback func()
WatcherDictionariesCallback func()
WatcherRulesCallback func()
WatcherMasksCallback func()
Settings *Settings
}
func (*App) DeleteTask ¶ added in v1.0.0
func (*App) ExportConfig ¶ added in v1.0.0
func (*App) LoadSettings ¶ added in v1.1.0
func (*App) NewTask ¶ added in v1.0.0
func (a *App) NewTask(args HashcatArgs, priority int64) (err error)
func (*App) NewWatcher ¶ added in v1.1.0
func (*App) RestoreTask ¶ added in v1.0.0
func (a *App) RestoreTask(restoreFile RestoreFile) (err error)
func (*App) RestoreTasks ¶ added in v1.0.0
func (*App) RestrictUI ¶ added in v1.0.0
func (a *App) RestrictUI()
func (*App) SaveSettings ¶ added in v1.1.0
func (*App) ScanDictionaries ¶ added in v1.0.0
func (*App) ScanHashes ¶ added in v1.0.0
func (*App) StartNextTask ¶ added in v1.0.0
func (a *App) StartNextTask()
StartNextTask starts the next queued task with the highest priority given that the task has not been started yet and there is no other running tasks tasks that have a priorty less than zero are not eligible
func (*App) TaskExists ¶ added in v1.0.0
type Hashcat ¶ added in v1.0.0
type Hashcat struct {
BinaryFile string `json:"binaryFile"`
Algorithms map[int64]string `json:"algorithms"`
}
func (*Hashcat) Benchmark ¶ added in v1.0.0
func (h *Hashcat) Benchmark(hashMode HashcatHashMode) (benchmark string, err error)
func (*Hashcat) LoadAlgorithms ¶ added in v1.0.0
func (h *Hashcat) LoadAlgorithms()
type HashcatArgs ¶ added in v1.0.0
type HashcatArgs struct {
Session *string
AttackMode *HashcatAttackMode `json:"attackMode"`
HashMode *HashcatHashMode `json:"hashMode"`
Dictionaries *[]string `json:"dictionaries"` // Files
Rules *[]string `json:"rules"` // Files
Mask *string `json:"mask"` // Direct Input
MaskFile *string `json:"maskFile"` // File
LeftDictionary *string `json:"leftDictionary"` // File
LeftRule *string `json:"leftRule"` // Direct Input
RightDictionary *string `json:"rightDictionary"` // File
RightRule *string `json:"rightRule"` // Direct Input
CustomCharset1 *string `json:"customCharset1"`
CustomCharset2 *string `json:"customCharset2"`
CustomCharset3 *string `json:"customCharset3"`
CustomCharset4 *string `json:"customCharset4"`
EnableMaskIncrementMode *bool `json:"enableMaskIncrementMode"`
MaskIncrementMin *int64 `json:"maskIncrementMin"`
MaskIncrementMax *int64 `json:"maskIncrementMax"`
Hash *string `json:"hash"` // File
Quiet *bool `json:"quiet"`
DisablePotFile *bool `json:"disablePotFile"`
DisableLogFile *bool `json:"disableLogFile"`
EnableOptimizedKernel *bool `json:"enableOptimizedKernel"`
EnableSlowerCandidateGenerators *bool `json:"enableSlowerCandidateGenerators"`
RemoveFoundHashes *bool `json:"removeFoundHashes"`
IgnoreUsernames *bool `json:"ignoreUsernames"`
DisableSelfTest *bool `json:"disableSelfTest"`
IgnoreWarnings *bool `json:"ignoreWarnings"`
DevicesIDs *[]int64 `json:"devicesIDs"`
DevicesTypes *[]int64 `json:"devicesTypes"`
WorkloadProfile *int64 `json:"workloadProfile"`
DisableMonitor *bool `json:"disableMonitor"`
TempAbort *int64 `json:"tempAbort"`
MarkovDisable *bool `json:"markovDisable"`
MarkovClassic *bool `json:"markovClassic"`
MarkovThreshold *int64 `json:"markovThreshold"`
ExtraArguments *[]string `json:"extraArguments"`
StatusTimer *int64 `json:"statusTimer"`
OutputFile *string `json:"outputFile"`
OutputFormat *[]int64 `json:"outputFormat"`
}
func (*HashcatArgs) Build ¶ added in v1.0.0
func (ha *HashcatArgs) Build() (args []string, err error)
type HashcatAttackMode ¶ added in v1.0.0
type HashcatAttackMode int64
const ( HashcatAttackModeDictionary HashcatAttackMode = iota HashcatAttackModeCombinator HashcatAttackModeMask HashcatAttackModeHybrid1 HashcatAttackModeHybrid2 )
type HashcatHashMode ¶ added in v1.0.0
type HashcatHashMode int64
type Restore ¶ added in v1.0.0
type RestoreFile ¶ added in v0.4.0
func (*RestoreFile) Unpack ¶ added in v1.0.0
func (rf *RestoreFile) Unpack() error
type Settings ¶ added in v1.1.0
type Settings struct {
TaskCounter int `json:"taskCounter"`
Language string `json:"language"`
// contains filtered or unexported fields
}
func (*Settings) ChangeLanguage ¶ added in v1.1.2
func (*Settings) CurrentLanguage ¶ added in v1.1.2
func (*Settings) CurrentTaskCounter ¶ added in v1.1.0
func (*Settings) NextTaskCounter ¶ added in v1.1.0
func (*Settings) ResetTaskCounter ¶ added in v1.1.0
type Task ¶ added in v1.0.0
type Task struct {
ID string `json:"id"`
Arguments []string `json:"arguments"`
Process subprocess.Subprocess `json:"process"`
Priority int64 `json:"priority"`
CreationTime int64 `json:"creationTime"`
}
func (*Task) Checkpoint ¶ added in v1.0.0
Checkpoint() asks to exit on the next checkpoint
func (*Task) SwitchToRestoreMode ¶ added in v1.1.0
SwitchToRestoreMode() changes the task's arguments to use --restore https://hashcat.net/wiki/doku.php?id=restore
