Documentation ¶
Overview ¶
Package rule contains the transformation logic to convert input into Hashcat rules
Index ¶
- func AppendRules(items map[string]int, operation string, bypass bool, debug bool) (returnMap map[string]int)
- func CharToIteratingRule(str string, rule string, index int) string
- func CharToRule(str string, rule string) string
- func FormatCharToIteratingRuleOutput(index int, strs ...string) (output string)
- func FormatCharToRuleOutput(strs ...string) (output string)
- func InsertRules(items map[string]int, index string, end string, bypass bool, debug bool) (returnMap map[string]int)
- func LenToRule(str string, rule string) string
- func OverwriteRules(items map[string]int, index string, end string, bypass bool, debug bool) (returnMap map[string]int)
- func PrependRules(items map[string]int, operation string, bypass bool, debug bool) (returnMap map[string]int)
- func StringToToggleRule(str string, rule string, index int) string
- func ToggleRules(items map[string]int, index string, end string, bypass bool, debug bool) (returnMap map[string]int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendRules ¶
func AppendRules(items map[string]int, operation string, bypass bool, debug bool) (returnMap map[string]int)
AppendRules transforms input into append rules
Args:
items (map[string]int): Items to use in the operation operation (string): Operation to use in the function bypass (bool): If true, the map is not used for output or filtering debug (bool): If true, print additional debug information to stderr
Returns:
returnMap (map[string]int): Map of items to return
func CharToIteratingRule ¶
CharToIteratingRule converts a string to a rule by its characters but increments along with each character
Args:
str (string): Input string to transform rule (string): Rule to insert per length index (int): Index to start at
Returns:
(string): Transformed string
func CharToRule ¶
CharToRule converts a string to a rule by its characters
Args:
str (string): Input string to transform rule (string): Rule to insert per character
Returns:
(string): Transformed string
func FormatCharToIteratingRuleOutput ¶
FormatCharToIteratingRuleOutput handles formatting of rule output for CharToIteratingRule functions
Args:
index (int): Index to start at strs (...string): Input strings to print
Returns:
output (string): Formatted output
func FormatCharToRuleOutput ¶
FormatCharToRuleOutput handles formatting of rule output for CharToRule functions
Args:
strs (...string): Input strings to print
Returns:
output (string): Formatted output
func InsertRules ¶
func InsertRules(items map[string]int, index string, end string, bypass bool, debug bool) (returnMap map[string]int)
InsertRules transforms input into insert rules by index
Args:
items (map[string]int): Items to use in the operation index (string): Index to insert at end (string): Index to end at bypass (bool): If true, the map is not used for output or filtering debug (bool): If true, print additional debug information to stderr
Returns: returnMap (map[string]int): Map of items to return
func LenToRule ¶
LenToRule converts a string to a rule by its length
Args:
str (string): Input string to transform rule (string): Rule to insert per length
Returns:
(string): Transformed string
func OverwriteRules ¶
func OverwriteRules(items map[string]int, index string, end string, bypass bool, debug bool) (returnMap map[string]int)
OverwriteRules transforms input into overwrite rules by index
Args:
items (map[string]int): Items to use in the operation index (string): Index to overwrite at end (string): Index to end at bypass (bool): If true, the map is not used for output or filtering debug (bool): If true, print additional debug information to stderr
Returns:
returnMap (map[string]int): Map of items to return
func PrependRules ¶
func PrependRules(items map[string]int, operation string, bypass bool, debug bool) (returnMap map[string]int)
PrependRules transforms input into prepend rules
Args:
items (map[string]int): Items to use in the operation operation (string): Operation to use in the function bypass (bool): If true, the map is not used for output or filtering debug (bool): If true, print additional debug information to stderr
Returns:
returnMap (map[string]int): Map of items to return
func StringToToggleRule ¶
StringToToggleRule converts a string to toggle rules by looking for upper chars
Args:
str (string): Input string to transform rule (string): Rule to insert per length index (int): Index to start at
Returns:
(string): Transformed string
func ToggleRules ¶
func ToggleRules(items map[string]int, index string, end string, bypass bool, debug bool) (returnMap map[string]int)
ToggleRules transforms input into toggle rules starting at an index
Args:
items (map[string]int): Items to use in the operation index (string): Index to start at end (string): Index to end at bypass (bool): If true, the map is not used for output or filtering debug (bool): If true, print additional debug information to stderr
Returns:
returnMap (map[string]int): Map of items to return
Types ¶
This section is empty.