Helper functions for password hash cracking (openrelik_worker_common.password_utils).
Summary
Functions
Bruteforces password hashes using Hashcat or John the Ripper (john).
Functions
@spec bruteforce_password_hashes( [String.t()], String.t() | nil, String.t(), String.t(), pos_integer() | keyword(), String.t(), keyword() ) :: [{String.t(), String.t()}]
Bruteforces password hashes using Hashcat or John the Ripper (john).
Parameters
password_hashes- List of password hashes as strings.tmp_dir- Path to use as a temporary directory.password_list_file_path- Path to the password list file.password_rules_file_path- Path to the password rules file.timeout- Number of seconds to run before terminating the process (default300).extra_args- Any extra arguments to be passed to Hashcat (default"").opts- Optional keyword overrides for testing (:which_fn,:cmd_runner,:pot_file,:fallback_password_list).
Returns
List of {password_hash, plaintext} tuples.
Raises
RuntimeError if execution fails or required tools/wordlists are unavailable.