|
15 | 15 | import hashlib
|
16 | 16 | import random
|
17 | 17 | import string
|
18 |
| - import threading |
| 18 | + from concurrent.futures import ThreadPoolExecutor |
19 | 19 | import time
|
20 | 20 | import base64
|
21 | 21 | from hashlib import pbkdf2_hmac
|
|
45 | 45 | threads_number = int(input(f"{BEFORE + current_time_hour() + AFTER} {INPUT} Threads Number -> {white}"))
|
46 | 46 | except:
|
47 | 47 | ErrorNumber()
|
48 |
| - |
| 48 | + |
49 | 49 | try:
|
50 |
| - characters_number = int(input(f"{BEFORE + current_time_hour() + AFTER} {INPUT} Password Characters Number Max -> {white}")) |
| 50 | + characters_number_min = int(input(f"{BEFORE + current_time_hour() + AFTER} {INPUT} Password Characters Number Min -> {white}")) |
| 51 | + except: |
| 52 | + ErrorNumber() |
| 53 | + |
| 54 | + try: |
| 55 | + characters_number_max = int(input(f"{BEFORE + current_time_hour() + AFTER} {INPUT} Password Characters Number Max -> {white}")) |
51 | 56 | except:
|
52 | 57 | ErrorNumber()
|
53 | 58 |
|
@@ -88,25 +93,25 @@ def CheckPassword(password_test):
|
88 | 93 | except:
|
89 | 94 | ErrorDecrypted()
|
90 | 95 |
|
91 |
| - def GeneratePassword(characters_number): |
92 |
| - return ''.join(random.choice(all_characters) for _ in range(random.randint(1, characters_number))) |
| 96 | + def GeneratePassword(characters_number_min, characters_number_max): |
| 97 | + return ''.join(random.choice(all_characters) for _ in range(random.randint(characters_number_min, characters_number_max))) |
93 | 98 |
|
94 | 99 | def TestDecrypted():
|
95 | 100 | global password
|
| 101 | + print(red) |
96 | 102 | while not password:
|
97 |
| - password_test = GeneratePassword(characters_number) |
| 103 | + password_test = GeneratePassword(characters_number_min, characters_number_max) |
98 | 104 | if password_test not in generated_passwords:
|
99 | 105 | generated_passwords.add(password_test)
|
100 | 106 | if CheckPassword(password_test):
|
101 | 107 | password = True
|
| 108 | + time.sleep(0.5) |
102 | 109 | print(f'{BEFORE + current_time_hour() + AFTER} {ADD} Password: {white}{password_test}{reset}')
|
103 | 110 | time.sleep(1)
|
104 | 111 | Continue()
|
105 | 112 | Reset()
|
106 | 113 |
|
107 | 114 | def Request():
|
108 |
| - from concurrent.futures import ThreadPoolExecutor |
109 |
| - |
110 | 115 | try:
|
111 | 116 | with ThreadPoolExecutor(max_workers=threads_number) as executor:
|
112 | 117 | executor.map(lambda _: TestDecrypted(), range(threads_number))
|
|
0 commit comments