rule

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package rule contains the transformation logic to convert input into Hashcat rules

Index

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

func CharToIteratingRule(str string, rule string, index int) string

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

func CharToRule(str string, rule string) string

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

func FormatCharToIteratingRuleOutput(index int, strs ...string) (output string)

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

func FormatCharToRuleOutput(strs ...string) (output string)

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

func LenToRule(str string, rule string) string

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

func StringToToggleRule(str string, rule string, index int) string

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.

Jump to

Keyboard shortcuts

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