this code is not extraordinarily fast but should give you an idea:
You can pipe that script's output into hashcat.
Code:
#!/usr/bin/env python3
from sys import argv
from itertools import product
if len(argv) != 2:
print("usage: {} placeholder_string\nexample: {} aaaaabbcdwxyz/aaaaaeeedwxyz/aaaaabbcdwxyz".format(argv[0], argv[0]))
exit(1)
charmap = {
'c': 'UES',
'd': '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'w': 'ABCDEFZ',
'x': 'RSTUVWXYZ',
'y': 'ABCDEFGHIJKL',
'z': 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890',
}
placeholder = list(argv[1])
def replace_all(stack, char_map):
return map(lambda a: char_map[a] if a in char_map else a, stack)
def yield_candidates(in_list, char_map):
char_map_list = [(x, list(y)) for x, y in char_map.items()]
for combination in product(*map(lambda x: x[1], char_map_list)):
active_char = {char_map_list[i][0]: combination[i]
for i in range(len(combination))}
yield replace_all(in_list, active_char)
for combination in yield_candidates(placeholder, charmap):
print(''.join(combination))
You can pipe that script's output into hashcat.
Code:
python script.py aaaaabbcdwxyz/aaaaaeeedwxyz/aaaaabbcdwxyz | hashcat [hash]