I am actually making a tool which takes minimum length & maximum length and then characters to use and then in the given criteria it writes every possible combination to a wordlist, but is there a way to get how many combinations can be made using Min Length, Max length & Characters
My Code is:
import itertools
min_len = int(input("Min Len: "))
max_len = int(input("Max Len: "))
characters = str(input("Characters To use: "))
for n in range(min_len, max_len + 1):
for xs in itertools.product(characters, repeat=n):
word = ''.join(xs)
print(f"Writing {word}")
I Am On Python3.8, Linux
Thanks For Helping In Advance!
Given
w
characters, you can createw**n
strings of lengthn
. So you're looking forw**min_length + ...... + w**max_length