Regex to hashcat rule
#2
(05-05-2021, 08:16 AM)matt99 Wrote: Any good way to transform a regex into a hashcat rule? Imo its very hard to understand 100% the syntax of hashcat rules. But i've got a regex like this
Code:
[Hh]e(l{1,2})o!

All in all, this is my problem: I have a large password, i have to brute force the first x characters, but i know the last y characters. Like my example above. But its way larger. I don't want to create a dictionary for this case, i want to use a hashcat command with the regex/rule/whatever inside and no X TB big dictionary file.

depends on how complex your regex / pw is

just given these little informations i would say a maskfile with a single mask + increment or a maskfile with some rising rules would be the best way

for example a simple maskfile with rising rules (not for use with increment)

# all 1-6
?a
?a?a
?a?a?a
?a?a?a?a
?a?a?a?a?a
?a?a?a?a?a?a

# basic 7-8
?l?d,?a?1?1?1?1?1?a
?l?d,?a?1?1?1?1?1?1?a
 
would test positions 1-6 with ?a charset and then switch to a more simple mask for length 7 and 8. i use this very basic maskfile for a very fast first attack on ntlm or other fast hashes (few minutes even with cpu only)

so given your simple exampe you can rewrite like this, to achieve the 1-2 l chars you have to do this by hand, see second line with two ?2

Hh,l,?1e?2o!
Hh,l,?1e?2?2o!

like i said, it depends on how complex your pw / regex is
Reply


Messages In This Thread
Regex to hashcat rule - by matt99 - 05-05-2021, 08:16 AM
RE: Regex to hashcat rule - by Snoopy - 05-05-2021, 02:14 PM