Fix option count computation

This commit is contained in:
Mattéo Delabre 2021-01-26 23:00:19 +01:00
parent f9d6b18bb9
commit 8084cadad9
Signed by: matteo
GPG Key ID: AE3FBD02DC583ABB
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@ def check_pairs(script, pairs):
def find_script(pairs, max_length):
candidates = []
total_options = len(string.printable) ** max_length
chars = len(string.printable)
total_options = int((chars ** (max_length + 1) - 1) / (chars - 1))
current_option = 0
for length in range(max_length + 1):