RULEST v2.0

100% GPU-Compatible Hashcat Rule Extraction Engine

OpenCL Powered
100% Hashcat Compatible
Complete Dataset Processing
Official Validation Engine

BREAKTHROUGH ACHIEVED

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.

Core Innovation

v2.0 integrates the official Hashcat validation engine (cleanup-rules.c logic) to guarantee every generated rule is 100% compatible with Hashcat GPU processing.

  • No More Invalid Rules: Zero "Skipping invalid or unsupported rule" errors
  • Complete Processing: Uses ALL words, not just samples
  • Dynamic Optimization: Auto-adjusts based on GPU memory
  • Production Ready: Verified with real Hashcat GPU runs

Performance Metrics

367,851
Words Processed
31.73s
Total Time
4,739
Valid Rules Found
100%
GPU Compatible

Complete v2.0 Workflow

1

Load Complete Datasets

Processes ALL words from both base and target wordlists. No sampling - every word is analyzed for maximum rule coverage.

2

Generate Valid Rules Only

Uses HashcatRuleValidator class that implements official Hashcat cleanup-rules.c logic. Only GPU-compatible rules are generated.

3

GPU-Accelerated Search

Processes 5,000-20,000 words per batch on GPU using optimized OpenCL kernels with dynamic memory management.

4

Multi-Depth Chaining

Finds rules chains up to depth 6 using BFS algorithm. Chains are validated at each step for GPU compatibility.

5

Final Validation

Every discovered rule is re-validated using Hashcat's official logic before saving. Guarantees 100% compatibility.

Official Hashcat Validation Engine

HashcatRuleValidator Class

Implements cleanup-rules.c Logic
Direct port of Hashcat's official rule validation
GPU-Only Rule Filtering
Removes memory/reject rules not supported on GPU
Syntax Validation
Validates rule structure and parameters
Position Validation
Ensures positions are within valid ranges

Valid GPU-Compatible Rules

l → Lowercase all
u → Uppercase all
c → Capitalize first
r → Reverse string
^X → Prepend character
$X → Append character

Validation Code Implementation

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)

v2.0 Key Features

100% GPU Compatibility

Every generated rule passes Hashcat's official validation. Zero "invalid rule" errors in production.

Complete Dataset Processing

Processes ALL words from both datasets, not just samples. Maximum rule coverage guaranteed.

Dynamic Memory Management

Auto-adjusting batch sizes from 5,000-20,000 words based on GPU memory and dataset size.

Multi-Depth Rule Chaining

Finds complex rule chains up to depth 6 using BFS algorithm with GPU acceleration.

Colorama Terminal UI

Beautiful colored output with progress bars, status indicators, and error highlighting.

Verified Production Results

Tested with 367,851 words - produced 4,739 valid rules in 31.73 seconds. Ready for production.

Command Line Interface

python rulest_v2.py base_wordlist.txt target_wordlist.txt -d 6 -o validated_rules.rule

Required Arguments

  • base_wordlist - Source wordlist path
  • target_wordlist - Target wordlist path
  • -d, --depth - Chain depth (1-6, default: 3)
  • -o, --output - Output file for rules

Advanced 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

Example Output

[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

Sample Validated Rules (v2.0 Output)

Substitution Rules

sZ[ → Z → [ substitution
sF} → F → } substitution
sU] → U → ] substitution
sb[ → b → [ substitution

Insertion/Overwrite

i5} → Insert } at position 5
o2C → Overwrite pos 2 with C
o7d → Overwrite pos 7 with d
i6l → Insert l at position 6

Simple 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