100% GPU-Compatible Hashcat Rule Extraction Engine
RULEST v2.0 now generates 100% GPU-compatible Hashcat rules with zero validation errors. Successfully processed 367,851 words in 31.73 seconds producing 4,739 validated rules that work flawlessly with Hashcat GPU.
v2.0 integrates the official Hashcat validation engine (cleanup-rules.c logic) to guarantee every generated rule is 100% compatible with Hashcat GPU processing.
Performance Metrics
Processes ALL words from both base and target wordlists. No sampling - every word is analyzed for maximum rule coverage.
Uses HashcatRuleValidator class that implements official Hashcat cleanup-rules.c logic. Only GPU-compatible rules are generated.
Processes 5,000-20,000 words per batch on GPU using optimized OpenCL kernels with dynamic memory management.
Finds rules chains up to depth 6 using BFS algorithm. Chains are validated at each step for GPU compatibility.
Every discovered rule is re-validated using Hashcat's official logic before saving. Guarantees 100% compatibility.
HashcatRuleValidator Class
Valid GPU-Compatible Rules
l → Lowercase all
u → Uppercase all
c → Capitalize first
r → Reverse string
^X → Prepend character
$X → Append character
class HashcatRuleValidator:
"""Official Hashcat validation logic from cleanup-rules.c"""
@staticmethod
def validate_rule_for_gpu(rule_str):
"""Validate rule for GPU compatibility (mode 2 from cleanup-rules.c)"""
# Rejects memory rules (M,4,6,X) - NOT GPU compatible
# Rejects reject rules (!,/,<,>,=) - NOT GPU compatible
# Validates rule syntax and parameters
# Returns True only for 100% GPU-compatible rules
# Example: 'sZ[' is VALID (substitution rule)
# Example: 'M' is INVALID (memory rule)
# Example: '!h' is INVALID (reject rule)
Every generated rule passes Hashcat's official validation. Zero "invalid rule" errors in production.
Processes ALL words from both datasets, not just samples. Maximum rule coverage guaranteed.
Auto-adjusting batch sizes from 5,000-20,000 words based on GPU memory and dataset size.
Finds complex rule chains up to depth 6 using BFS algorithm with GPU acceleration.
Beautiful colored output with progress bars, status indicators, and error highlighting.
Tested with 367,851 words - produced 4,739 valid rules in 31.73 seconds. Ready for production.
python rulest_v2.py base_wordlist.txt target_wordlist.txt -d 6 -o validated_rules.rule
Required Arguments
base_wordlist - Source wordlist pathtarget_wordlist - Target wordlist path-d, --depth - Chain depth (1-6, default: 3)-o, --output - Output file for rulesAdvanced Options
--batch-size - GPU batch size (auto: 5k-20k)--verify - Verify all chains before saving--list-rules - Show all valid rule types--stats - Show detailed statistics-h, --help - Show colored help[LOAD] Loading: base_wordlist.txt [OK] Loaded: 367,851 words [SETUP] Generating VALID Hashcat rules for GPU... [OK] Generated: 1,188 GPU-compatible Hashcat rules [GPU] GPU: NVIDIA GeForce RTX 4090 [INFO] Global Memory: 24GB [GPU] Processing ALL words with single rules... [INFO] Processing ALL 367,851 words in 74 batches [INFO] Batch size: 5,000 words [OK] Total unique single rules found: 4,739 [OUTPUT] Output saved to: validated_rules.rule [NOTE] All chains are GPU-compatible and valid for Hashcat
Substitution Rules
sZ[ → Z → [ substitutionsF} → F → } substitutionsU] → U → ] substitutionsb[ → b → [ substitutionInsertion/Overwrite
i5} → Insert } at position 5o2C → Overwrite pos 2 with Co7d → Overwrite pos 7 with di6l → Insert l at position 6Simple Transformations
c → Capitalize first letter} → Rotate right^r → Prepend 'r'o5] → Overwrite pos 5 with ]Hashcat Verification
All generated rules work flawlessly with Hashcat GPU. Example Hashcat command:
hashcat -m 0 -a 0 hashes.txt wordlist.txt -r validated_rules.rule
✓ No "Skipping invalid or unsupported rule" errors