hashcat Forum
Mask or rules that must include two strings - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Support (https://hashcat.net/forum/forum-3.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-45.html)
+--- Thread: Mask or rules that must include two strings (/thread-11197.html)



Mask or rules that must include two strings - JJAbrams - 12-17-2022

I would like to create a mask or rule that meets the following requirements:
  • Between 10 and 20 characters
  • Each character can be anything (?a)
  • The plaintext must include "hello"
  • The plaintext must include "world"

Is there a way to do this with masks or rules?


RE: Mask or rules that must include two strings - JJAbrams - 12-17-2022

And, to add to this, could it be extended to include multiple versions of those word? i.e. must include "hello" OR "HELLO", AND must include "world" OR "WORLD".


RE: Mask or rules that must include two strings - Snoopy - 12-19-2022

well you could achieve this by masks and maskfiles yes, but but this will be a huge task as you have to generate all possiblities on your own, you could utilize combine from hashat tools for this, ill give you a start

1.txt
Code:
world
WORLD
hello
HELLO
?a
?a?a
?a?a?a
?a?a?a?a
?a?a?a?a?a

i added these ?a to 5 as this will make it easier to know (4) when to break

combine 1.txt 1.txt > 2.txt
combine 1.txt 2.txt > 3.txt
combine 1.txt 3.txt > 4.txt


copy/concat this 4 files into one file, there will be lines which will not match (to short, to long), you have to clean them (python, bash whatever) on your own, use the matching lines as input maskfile, these should cover all possibilities