-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
one bug fix for hashcat and a lot of logging and govet fixes
- Loading branch information
Showing
8 changed files
with
128 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,38 @@ | ||
package hashcat5 | ||
|
||
// Assumes ?1=?l?d, ?2=?u?l?d, ?3=?d?s, ?4=?l?d?s | ||
var CharSetPreDefCustom1 = "?l?d" // Lower ad number | ||
var CharSetPreDefCustom2 = "?u?l?d" // Upper, lower, and number | ||
var CharSetPreDefCustom3 = "?d?s" // number and symbols | ||
var CharSetPreDefCustom4 = "?l?d?s" // lower, number, and symbol | ||
// CharSetPreDefCustom1 is a custom character set that includes lower case and numbers | ||
var CharSetPreDefCustom1 = "?l?d" | ||
|
||
// CharSetPreDefCustom2 is a custom character set that includes lower case, upper case and numbers | ||
var CharSetPreDefCustom2 = "?u?l?d" | ||
|
||
// CharSetPreDefCustom3 is a custom character set that includes numbers and symbols | ||
var CharSetPreDefCustom3 = "?d?s" | ||
|
||
// CharSetPreDefCustom4 is a custom character set that includes lower case, numbers and symbols | ||
var CharSetPreDefCustom4 = "?l?d?s" | ||
|
||
// Charset is a structure representing a character set for Hashcat. It has a name for easy of selection and a Mask that is the value given to Hashcat. | ||
type Charset struct { | ||
Name string | ||
Mask string | ||
} | ||
|
||
// Charsets is a slice of Charset structs | ||
type Charsets []Charset | ||
|
||
// Len is the length of the Charsets for sorting | ||
func (r Charsets) Len() int { | ||
return len(r) | ||
|
||
} | ||
|
||
// Swap is the swap function of the Charsets for sorting | ||
func (r Charsets) Swap(i, j int) { | ||
r[i], r[j] = r[j], r[i] | ||
} | ||
|
||
// Less is the comparison of the Charsets for sorting | ||
func (r Charsets) Less(i, j int) bool { | ||
return r[i].Name < r[j].Name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
package hashcat5 | ||
|
||
// Dictionary is a structure for working with dictionaries related to Hashcat. The Dictionary has a name for display and a file path which is given to Hashcat. | ||
type Dictionary struct { | ||
Name string | ||
Path string | ||
} | ||
|
||
// Dictionaries is a slice of Dictionary structs | ||
type Dictionaries []Dictionary | ||
|
||
// Len is a function giving the length of the slice for sorting | ||
func (d Dictionaries) Len() int { | ||
return len(d) | ||
|
||
} | ||
|
||
// Swap is a function for swaping slice indexes for sorting | ||
func (d Dictionaries) Swap(i, j int) { | ||
d[i], d[j] = d[j], d[i] | ||
} | ||
|
||
// Less is a comparision function for sorting | ||
func (d Dictionaries) Less(i, j int) bool { | ||
return d[i].Name < d[j].Name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
package hashcat5 | ||
|
||
// RuleFile is a structure for storing rules for hashcat. Name is a display name and Path specifies the file path. | ||
type RuleFile struct { | ||
Name string | ||
Path string | ||
} | ||
|
||
// RuleFiles is a slice of RuleFile structs | ||
type RuleFiles []RuleFile | ||
|
||
// Len returns the slice length for the sorting interface. | ||
func (r RuleFiles) Len() int { | ||
return len(r) | ||
|
||
} | ||
|
||
// Swap swaps values by index for the sorting interface. | ||
func (r RuleFiles) Swap(i, j int) { | ||
r[i], r[j] = r[j], r[i] | ||
} | ||
|
||
// Less compares values by index for the sorting interface. | ||
func (r RuleFiles) Less(i, j int) bool { | ||
return r[i].Name < r[j].Name | ||
} |
Oops, something went wrong.