Closed PerchunPak closed 3 years ago
I also tried use d89b0568a35ab2979ce94442b7c87a97c62847b1 when regex was only added, and it dont work lol
I also tried use d89b056 when regex was only added, and it dont work lol
base
type word list supported function only containsF1 F2 F3 F4
, and not supported F7
regex function.
reference https://github.com/LandGrey/pydictor#all-of-pydictor-can-generating-wordlist .
you can use --conf
or
first use -base
generate word list and after use -tool handler
to filter word list by --regex
.
I make skript which generate same as pydictor, but also have regex support.
import itertools
import re
symbolsForGen = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
with open("generated.txt", "a") as f:
for i in range(3, 3+1):
for item in itertools.product(symbolsForGen, repeat=i):
print("".join(item))
resultNum = re.search(r'[(A-z)]*\d{1}[(A-z)]*', "".join(item))
if not resultNum is None:
print(len(resultNum.group(0)), resultNum.group(0))
if len(resultNum.group(0)) == 3:
f.write("".join(item) + '\n')
Maybe later i will create pull request
I make skript which generate same as pydictor, but also have regex support.
import itertools import re symbolsForGen = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] with open("generated.txt", "a") as f: for i in range(3, 3+1): for item in itertools.product(symbolsForGen, repeat=i): print("".join(item)) resultNum = re.search(r'[(A-z)]*\d{1}[(A-z)]*', "".join(item)) if not resultNum is None: print(len(resultNum.group(0)), resultNum.group(0)) if len(resultNum.group(0)) == 3: f.write("".join(item) + '\n')
Maybe later i will create pull request
-base
option supported function only contains F1 F2 F3 F4
, that's only for speed generate word list, not other reasons.
I also tried change value "pyoptions.filter_regex" in
pydictor\lib\fun\filter.py:245
tor'[(A-z)]*\d{1}[(A-z)]*'
and it doesnt worked. This regex filter all values what have only one number from others. Command which i usepython pydictor.py -base dLc -o /test.txt --len 3 3 --regex r'[(A-z)]*\d{1}[(A-z)]*'
I also tried do filter with additional file
main.py
And it works fine