hashcat3

package
v0.0.0-...-e2bd792 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2019 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USER_HASHES_FILENAME      = "user-input-hashes.txt"
	HASHCAT_POT_SHOW_FILENAME = "hashcat-pot-show.txt"
	HASHCAT_LEFT_FILENAME     = "hashcat-left.txt"
	HASH_OUTPUT_FILENAME      = "output-hashes.txt"
)

Variables

View Source
var CharSetPreDefCustom1 = "?l?d" // Lower ad number

Assumes ?1=?l?d, ?2=?u?l?d, ?3=?d?s, ?4=?l?d?s

View Source
var CharSetPreDefCustom2 = "?u?l?d" // Upper, lower, and number
View Source
var CharSetPreDefCustom3 = "?d?s" // number and symbols
View Source
var CharSetPreDefCustom4 = "?l?d?s" // lower, number, and symbol
View Source
var StatusTable = map[string]string{
	"0":  "Init",
	"1":  "Starting",
	"2":  "Running",
	"3":  "Paused",
	"4":  "Exhausted",
	"5":  "Cracked",
	"6":  "Aborted",
	"7":  "Quit",
	"8":  "Bypass",
	"9":  "StopAtCheckpoint",
	"10": "Autotune",
}

StatusTable is a table to convert status numbers in hashcat to a word

Functions

func HashcatHelpScanner

func HashcatHelpScanner(help string, section string) map[string][]string

HashcatHelpScanner is designed to return a table struct of the hashcat help output

func NewTooler

func NewTooler() common.Tooler

NewTooler returns a hashcat3 impementation of the common.Tooler

func ParseHashcatOutputFile

func ParseHashcatOutputFile(r io.Reader, inputSplit int, hashMode string) (count int64, hashes [][]string)

ParseHashcatOutputFile parses the Hashcat Output file

func ParseLeftHashFile

func ParseLeftHashFile(r io.Reader) (count int64, split int)

ParseLeftHashFile takes an io.Reader and returns the number of lines (hashes) and the number of separators (:)

func ParseShowPotFile

func ParseShowPotFile(r io.Reader, leftSplit int, hashMode string) (count int64, hashes [][]string)

ParseShowPotFile pull the line count and the hash output from the show pot outputfile

func Setup

func Setup(confPath string) error

Setup configures this plugin for running and returns and error something is wrong.

Types

type Charset

type Charset struct {
	Name string
	Mask string
}

type Charsets

type Charsets []Charset

func (Charsets) Len

func (r Charsets) Len() int

func (Charsets) Less

func (r Charsets) Less(i, j int) bool

func (Charsets) Swap

func (r Charsets) Swap(i, j int)

type Config

type Config struct {
	BinPath      string
	WorkingDir   string
	Args         []string
	Separator    string
	PotFilePath  string
	HashModes    HashModes
	Dictionaries Dictionaries
	RuleFiles    RuleFiles
	Charsets     Charsets
}

Config is structure to hold configuration

type Dictionaries

type Dictionaries []Dictionary

func (Dictionaries) Len

func (d Dictionaries) Len() int

func (Dictionaries) Less

func (d Dictionaries) Less(i, j int) bool

func (Dictionaries) Swap

func (d Dictionaries) Swap(i, j int)

type Dictionary

type Dictionary struct {
	Name string
	Path string
}

type HashMode

type HashMode struct {
	Number   string
	Name     string
	Category string
}

HashMode is a structure to hold an instance of hashcat's hash mode data

type HashModes

type HashModes []HashMode

HashModes is a slice of HashMode

func (HashModes) Len

func (h HashModes) Len() int

func (HashModes) Less

func (h HashModes) Less(i, j int) bool

func (HashModes) Swap

func (h HashModes) Swap(i, j int)

type RuleFile

type RuleFile struct {
	Name string
	Path string
}

type RuleFiles

type RuleFiles []RuleFile

func (RuleFiles) Len

func (r RuleFiles) Len() int

func (RuleFiles) Less

func (r RuleFiles) Less(i, j int) bool

func (RuleFiles) Swap

func (r RuleFiles) Swap(i, j int)

type Status

type Status struct {
	Status          string
	Attempted       int64
	Keyspace        int64
	Progress        float64
	EstimateTime    string
	Speed           []float64 // speed in hashes per sec
	RecoveredHashes int64
	TotalHashes     int64
	Temperature     []int
}

Status standard return status

func ParseMachineOutput

func ParseMachineOutput(out string) (Status, error)

ParseMachineOutput returns a Status for a given status line

type Tasker

type Tasker struct {
	// contains filtered or unexported fields
}

Tasker is the structure that implements the Tasker inteface

func (*Tasker) IOE

func (t *Tasker) IOE() (io.Writer, io.Reader, io.Reader)

IOE is no longer used and is a empty interface for

func (*Tasker) Pause

func (t *Tasker) Pause() error

Pause kills the hashcat process and marks the job as paused

func (*Tasker) Quit

func (t *Tasker) Quit() common.Job

Quit kills the hashcat process and then returns the most up-to-date status

func (*Tasker) Run

func (t *Tasker) Run() error

Run starts or resumes the job

func (*Tasker) Status

func (t *Tasker) Status() common.Job

Status returns the common.Job option of the Tasker

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL