-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathspidey.py
61 lines (55 loc) · 2.17 KB
/
spidey.py
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import hashlib
import sys
import pyfiglet
ascii_banner = pyfiglet.figlet_format("SPIDEY HASH CRACKER")
print(ascii_banner)
welcoming = input("welcome to the spidey world: ")
print("Algorithms available: MD5 | SHA1 | SHA224 | SHA512 | SHA256 | SHA384")
hash_type = input("Enter hash type? ")
wordlist_location = input("enter wordlist location: ")
hashed_password = input("enter encryptiony: ")
word_list = open(wordlist_location, "r", encoding='utf-8', errors='ignore').read().splitlines()
if hash_type == "MD5":
for word in word_list:
hash_object = hashlib.md5(word.encode('utf-8'))
hash_digest = hash_object.hexdigest()
if hashed_password == hash_digest:
print(f"\033[1;32m HASH FOUND: {word} \n")
break
elif hash_type == "SHA1":
for word in word_list:
hash_object = hashlib.sha1(word.encode('utf-8'))
hash_digest = hash_object.hexdigest()
if hashed_password == hash_digest:
print(f"\033[1;32m HASH FOUND: {word} \n")
break
elif hash_type == "SHA224":
for word in word_list:
hash_object = hashlib.sha224(word.encode('utf-8'))
hash_digest = hash_object.hexdigest()
if hashed_password == hash_digest:
print(f"\033[1;32m HASH FOUND: {word} \n")
break
elif hash_type == "SHA512":
for word in word_list:
hash_object = hashlib.sha512(word.encode('utf-8'))
hash_digest = hash_object.hexdigest()
if hashed_password == hash_digest:
print(f"\033[1;32m HASH FOUND: {word} \n")
break
elif hash_type == "SHA256":
for word in word_list:
hash_object = hashlib.sha256(word.encode('utf-8'))
hash_digest = hash_object.hexdigest()
if hashed_password == hash_digest:
print(f"\033[1;32m HASH FOUND: {word} \n")
break
elif hash_type == "SHA384":
for word in word_list:
hash_object = hashlib.sha384(word.encode('utf-8'))
hash_digest = hash_object.hexdigest()
if hashed_password == hash_digest:
print(f"\033[1;32m HASH FOUND: {word} \n")
break
else:
print("please choose from the given option.")