Quantcast
Channel: hashcat Forum - All Forums
Viewing all articles
Browse latest Browse all 7673

Duprule: detect & remove duplicate rules

$
0
0
Duprule is a tool to detect & remove duplicate rules, inspired from issue 301 in hashcat.

Link

https://github.com/0xbsec/duprule/


How does it works ?

TL;DR: Each rule change is mapped, and a unique id is generated for each rule with functions count.

The mechanism is like this:

- A blank map is created with $n ( from 1 to 37 ) default characters.
- Each rule change will be applied to the map.
    Example rule: 'u', will change all characters cases from '?' ( unknown ) to 'u' ( upper case ).
    'sab', will add {'a' -> 'b'} to the map. And same logic apply for the other rules.
- An id is generated from the map.
- The ids are compared to detect duplicate rules.
- The rule with the least functions count will be choosed. ( there's a plan to add readability  to select the rule, check issue #4 for updates ).

Which rules are supported ?

Currently all rules on this page are supported except: 
    - Memory rules: X, 4, 6, M
    - Reject plains rules
    - E

Usage

duprule.pl take input rules from STDIN.
Example: 
perl duprule.pl < /tmp/rockyou.rule
Will print unique, non ordered, rules to STDOUT. And save duplicate rules to 
duplicates.txt


This is still in development and some features are not supported. Any feature/test/bug report is welcomed.

I'd like to hear your thoughts about the tool Big Grin

Viewing all articles
Browse latest Browse all 7673

Trending Articles