-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdecodehash.py
More file actions
231 lines (180 loc) · 8.37 KB
/
decodehash.py
File metadata and controls
231 lines (180 loc) · 8.37 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
#!/usr/bin/python3
#coding: utf-8
# # python_scripts
import hashlib
import sys
import os
from pygments import console
# manual text colored
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
try:
type_hash = sys.argv[1]
hash_a = sys.argv[2]
except:
# # encoding part
algorithms = hashlib.algorithms_guaranteed
print(bcolors.BOLD+"""\n
███████╗███████╗███████╗███████╗███████╗███████╗███████╗███████╗███████╗███████╗
╚══════╝╚══════╝╚══════╝╚══════╝╚══════╝╚══════╝╚══════╝╚══════╝╚══════╝╚══════╝
"""+bcolors.ENDC)
print(" List OF Hash algorithmS: \n")
for lst in algorithms:
print(bcolors.OKGREEN+" ",lst.lower()+bcolors.ENDC)
# print(" ")
print(bcolors.BOLD+"""
███████╗███████╗███████╗███████╗███████╗███████╗███████╗███████╗███████╗███████╗
╚══════╝╚══════╝╚══════╝╚══════╝╚══════╝╚══════╝╚══════╝╚══════╝╚══════╝╚══════╝
"""+bcolors.ENDC)
print(bcolors.FAIL+"""
"""
+
str(os.system("cat banner/banner.txt"))
+bcolors.BOLD+
"""
[ Hash3sCracker_ ]
Author: Abhijit boro
Instagram: https://www.instagram.com/_z3r0day_/
Twitter: https://www.twitter.com/@0101Whoami
"""+bcolors.ENDC)
print(" [ * ] USAGE: Just run python3 "+sys.argv[0]+" / To encode plain text and more..")
print(" [ * ] USAGE: python3 "+sys.argv[0]+" [ hash_type ] which is do you wanna check [ your hash ] and hit enter \n")
print(" [ # ] hashes.. (sha3_256, sha3_224, md5, shake_256, sha224, blake2s, blake2b) \n")
print(" [ readme ] You must can use those are mention there \n")
print(" [ 1 ] Do you want to encode plain text If Yes_! get space && hit Enter ")
print(" [ 2 ] Do you want to encode Digest hashes..? type ( DIGESTHASH )")
print(" [ 3 ] Do you want to identify hashes..? type ( IdentifyHASH )\n")
print(" [ readme ] wordlist are major role in this software, without @ good wordlist and it is //shit// \n")
print(" [ * ] Or if you wan2 cancel press ( CTL+C )\n")
try:
ask = input(bcolors.FAIL+" Asking..? choose from readme"+bcolors.ENDC+"... ")
if ask == " ":
# your text to encode
plain_text = input("\n plain Text>_ ")
# encode it to bytes using UTF-8 encoding
text_to_encode = plain_text.encode()
# hash with diff algorithms
hashtype = input("\n hash type>_ ")
# md5 algorithm
if hashtype == "md5":
print(console.colorize("yellow","\n [ + ] MD5: →"), console.colorize("red", hashlib.md5(text_to_encode).hexdigest()))
sys.exit()
# sha1 algorithm
elif hashtype == "sha1":
print(console.colorize("yellow","\n [ + ] SHA1: →"), console.colorize("red", hashlib.sha1(text_to_encode).hexdigest()))
sys.exit()
# sha512 algorithm
elif hashtype == "sha512":
print(console.colorize("yellow","\n [ + ] SHA512: →"), console.colorize("red", hashlib.sha512(text_to_encode).hexdigest()))
sys.exit()
# sha3_256 algorithm
elif hashtype == "sha3_256":
print(console.colorize("yellow","\n [ + ] SHA3_256: →"), console.colorize("red", hashlib.sha3_256(text_to_encode).hexdigest()))
sys.exit()
# blake2s algorithm
elif hashtype == "blake2s":
print(console.colorize("yellow","\n [ + ] BLAKE2S: →"), console.colorize("red", hashlib.blake2s(text_to_encode).hexdigest()))
sys.exit()
# blake2b algorithm
elif hashtype == "blake2b":
print(console.colorize("yellow","\n [ + ] BLAKE2B: →"), console.colorize("red", hashlib.blake2b(text_to_encode).hexdigest()))
sys.exit()
# # shake_128 algorithm
elif hashtype == "shake_128":
print(console.colorize("yellow", "\n [ + ] SHAKE_128: →"), console.colorize("red", hashlib.shake_128(text_to_encode).hexdigest()))
sys.exit()
# sha3_224 algorithm
elif hashtype == "sha3_224":
print(console.colorize("yellow","\n [ + ] SHA3_224: →"), console.colorize("red", hashlib.sha3_224(text_to_encode).hexdigest()))
sys.exit()
# SHA384 algorithm
elif hashtype == "sha384":
print(console.colorize("yellow","\n [ + ] SHA384: →"), console.colorize("red", hashlib.sha384(text_to_encode).hexdigest()))
sys.exit()
# SHA3_384 algorithm
elif hashtype == "sha3_384":
print(console.colorize("yellow","\n [ + ] SHA3_384: →"), console.colorize("red", hashlib.sha3_384(text_to_encode).hexdigest()))
sys.exit()
else:
print(bcolors.FAIL+"\n try @gain_! "+bcolors.ENDC)
sys.exit()
# for digest hashing...
elif ask == "DIGESTHASH":
import DigestHASHgenerator as advhash
sys.exit()
# for hash identifier
elif ask == "IdentifyHASH":
import hashidentifyer as identyhash
sys.exit()
except KeyboardInterrupt:
#print(KeyboardInterrupt)
print("\n\n " + bcolors.FAIL+" [ - ] Nothing choose from Above"+bcolors.ENDC)
print("\n Thanks for using "+ bcolors.FAIL+"HashesFinderDecoder_"+bcolors.ENDC, "\n")
sys.exit()
# # decoding part
# READING MY WORDLIST TO FIND THE PASSWORD_!
wordlist = open('rockyou.txt', 'r').readlines()
for password in wordlist:
password = password.strip()
password = password.encode(encoding = 'UTF-8', errors = 'strict')
try:
# MD5 ALGORITHM
if type_hash == "md5":
hash_b = hashlib.md5(password).hexdigest()
# SHA1 ALGORITHM
elif type_hash == "sha1":
hash_b = hashlib.sha1(password).hexdigest()
# SHA512 ALGORITHM
elif type_hash == "sha512":
hash_b = hashlib.sha512(password).hexdigest()
# SHA384 ALGORITHM
elif type_hash == "sha384":
hash_b = hashlib.sha384(password).hexdigest()
# SHA3_256 ALGORITHM
elif type_hash == "sha3_256":
hash_b = hashlib.sha3_256(password).hexdigest()
# BLAKE2S ALGORITHM
elif type_hash == "blake2s":
hash_b = hashlib.blake2s(password).hexdigest()
# BLAKE2B ALGORITHM
elif type_hash == "blake2b":
hash_b = hashlib.blake2b(password).hexdigest()
# BLAKE2S ALGORITHM
elif type_hash == "sha3_224":
hash_b = hashlib.sha3_224(password).hexdigest()
# SHA3_384 ALGORITHM
elif type_hash == "sha3_384":
hash_b = hashlib.sha3_384(password).hexdigest()
# SHA256 ALGORITHM
elif type_hash == "sha256":
hash_b = hashlib.sha256(password).hexdigest()
except Exception as e:
print("\n " + bcolors.FAIL+" [ - ] Nothing choose from Above"+bcolors.ENDC)
print("\n [ + ] Thanks for using "+ bcolors.FAIL+"HashesFinderDecoder_"+bcolors.ENDC+"\n")
sys.exit()
try:
# RESULT POINT
if hash_a == hash_b:
print("""
[ + ] ############################################
[ + ] ############################################
[ + ] ############################################
[ + ] #########""", bcolors.ENDC+ console.colorize("yellow", "key found"), "[ ", password," ]", """#########
[ + ] ############################################
[ + ] ############################################
[ + ] ############################################
""")
sys.exit()
else:
print(" [ - ] not found_? : ", password)
except KeyboardInterrupt:
print(KeyboardInterrupt)
print("\n [ + ] Thanks for using "+ bcolors.FAIL+"HashesFinderDecoder_"+bcolors.ENDC+"\n")
sys.exit()