-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestScript.py
More file actions
28 lines (20 loc) · 817 Bytes
/
Copy pathtestScript.py
File metadata and controls
28 lines (20 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from passlib.hash import sha512_crypt
import concurrent.futures
hashedPassword = "$6$xgLS35S6$2UjEq.dUhICPw9zgDVJXcQYQp/9ilLPQt/8Zgu0uwngI5mVvB1eKQG9SnVLjmOOfkB4Jjb5VSAXGXjY4Cf5k90"
passwordFile = "passwords.txt"
def checkPasswords(password):
password = password.strip()
if sha512_crypt.verify(password, hashedPassword):
print(f"The password is: {password}")
return password
return None
def findPasswords():
with open(passwordFile, "r", encoding="utf-8") as file:
passwords = file.readlines()
with concurrent.futures.ThreadPoolExecutor(max_workers=8) as executor:
results = executor.map(checkPasswords, passwords)
for result in results:
if result:
break
if __name__ == "__main__":
findPasswords()