forked from salvacorts/Password-Cracking-Suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcsuit.py
executable file
·268 lines (245 loc) · 14.8 KB
/
csuit.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
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Libraries
import os
import time
# Colors
class bg:
input = '\033[95m'
blue = '\033[94m'
green = '\033[92m'
option = '\033[93m'
fail = '\033[91m'
end = '\033[0m'
bold = '\033[1m'
underline = '\033[4m'
def lock():
print("\n"+bg.option)
print(" :;;;;;;;;;;; ")
print(" ;;;;;;;;;;;;;;; ")
print(" `;;;;;;;;;;;;;;;;; ")
print(" ;;;;;;` `;;;;;; ")
print(" ;;;;; ,;;;;` ")
print(" .;;;; ,;;;; ")
print(" ;;;; ;;;; ")
print(" ;;;; ;;;; ")
print(" .;;;. ;;;; ")
print(" ;;;; ;;;; ")
print(" ;;;; .;;; ")
print(" ;;;; ")
print(" ;;;; ..... ")
print(" :::::::::::::::::::::::::::::::: ")
print(" :::::::::::::::::::::::::::::::: ")
print(" :::::::::::::::::::::::::::::::: ")
print(" ,:::. :::: ")
print(" ,:::. ;;;; :::: ")
print(" ,:::, ;;;;;. :::: ")
print(" .:::, ;;;;;; :::: ")
print(" .:::, ;;;;;, :::: ")
print(" :::: ;;;;;, ,:::: ")
print(" ::::: ;;;;;; :::: ")
print(" ::::, ;;;;;; ::::: ")
print(" ,::::, ::::: ")
print(" :::::: ,::::: ")
print(" :::::::. :::::::` ")
print(" :::::::::::::::::::: ")
print(" `::::::::::::::::: ")
print(" .::::::::::::: ")
print(bg.input+bg.bold+bg.underline+"\n\tPassword Cracking Suit by @SalvaCorts for @TecnoHackOrg"+bg.end)
# Banner
def banner():
print("\n"+bg.end+bg.green+"##################################################################################")
print("# #")
print("#"+bg.underline+bg.bold+bg.input+"\t\t\t Hash Craking Suite by @SalvaCorts "+bg.end+bg.green+" #")
print("# #")
print("# #")
print("# #")
print("#"+bg.end+bg.bold+"\t\t\t\t·HASH IDENTIFICATION:"+bg.end+bg.green+" #")
print("# #")
print("#"+bg.option +"\t[1]"+bg.blue+"Hash Type"+bg.end+bg.green+" #")
print("# #")
print("# #")
print("# #")
print("#"+bg.end+bg.bold+"\t\t\t\t·HASH CRACKING:"+bg.end+bg.green+" #")
print("# #")
print("#"+bg.option+"\t[2]"+bg.blue+" Online Crack\t"+bg.option+"[3]"+bg.blue+" Dictionary Crack\t"+bg.option+"[4]"+bg.blue+" Bruteforce"+bg.end+bg.green+" #")
print("# #")
print("# #")
print("# #")
print("#"+bg.end+bg.bold+"\t\t\t\t·MISCELLANEOUS:"+bg.green+" #")
print("# #")
print("#"+bg.end+bg.option+"\t[5]"+bg.blue+" List Dictionaries\t"+bg.option+"[6]"+bg.blue+" Create a Dictionary"+bg.green+" #")
print("# #")
print("#"+bg.end+bg.option+"\t[7]"+bg.blue+" Install Tools\t"+bg.option+"[8]"+bg.blue+" Exit"+bg.green+" #")
print("# #")
print("##################################################################################\n"+bg.end)
# bruteforce Banner
def brutBanner():
print("\n"+bg.end+bg.green+"##################################################################################")
print("# #")
print("#"+bg.underline+bg.bold+bg.input+"\t\t\t Hash Craking Suite by @SalvaCorts "+bg.end+bg.green+" #")
print("# #")
print("# #")
print("# #")
print("#"+bg.end+bg.bold+"\t\t\t\t·Incremental Modes:"+bg.end+bg.green+" #")
print("# #")
print("#"+bg.option+"\t[*]"+bg.blue+" Only Letters:"+bg.input+" alpha"+bg.green+" #")
print("#"+bg.option+"\t[*]"+bg.blue+" Only Numbers:"+bg.input+" digits"+bg.green+" #")
print("#"+bg.option+"\t[*]"+bg.blue+" Letters, Numbers and Special Characters:"+bg.input+" lanman"+bg.green+" #")
print("#"+bg.option+"\t[*]"+bg.blue+" All Characters:"+bg.input+" all"+bg.green+" #")
print("# #")
print("# #")
print("##################################################################################\n"+bg.end)
# Ask if finish
def finish():
finish = input(bg.input+"\n [+] "+bg.blue+"Finish?(y/n) >> "+bg.end)
finish = str(finish)
if (finish == "y"):
main()
else:
while True:
finish = input(bg.input+"\n [+] "+bg.blue+"Finish?(y/n) >> "+bg.end)
finish = str(finish)
if finish == "y":
main()
else:
continue
# Online Crack
def online():
os.system("clear")
hash = input(bg.input+"\n [+] "+bg.blue+"Hash? >> "+bg.end)
hashType = input(bg.input+"\n [+] "+bg.blue+"Hash Encryption? >> "+bg.end)
hashType = str(hashType)
os.system("python2 tools/online.py "+hashType+" -h"+" '"+hash+"'")
# List Dictionaries
def dics():
os.system("clear")
print("\n"+bg.option+"#########################################################################"+bg.end+bg.bold+"\n")
os.system("ls dics/ | grep '' ")
print("\n"+bg.option+"#########################################################################"+bg.end)
print("\n")
# Dictionary Creator
def newDic():
os.system("clear")
minLen = input(bg.input+"\n [+] "+bg.blue+"Password Minimun Length (the same as pattern)? >> "+bg.end)
minLen = str(minLen)
maxLen = input(bg.input+"\n [+] "+bg.blue+"Password Maximun Length? >> "+bg.end)
maxLen = str(maxLen)
char = input(bg.input+"\n [+] "+bg.blue+"Characters to be used?[] >> "+bg.end)
char = str(char)
pattern = input(bg.input+"\n [+] "+bg.blue+"Pattern to be based on and variations (Ej: word@@ will create word11, word12,...,word99)?[] >> "+bg.end)
pattern = str(pattern)
name = input(bg.input+"\n [+] "+bg.blue+"Dictionary Name? >> "+bg.end)
name = str(name)
if (char == ""):
print (bg.option+"\n [*] Running command: "+bg.end+"crunch "+bg.input+minLen+" "+maxLen+bg.end+" -o dics/"+bg.input+name+bg.end+"\n")
os.system("crunch "+minLen+" "+maxLen+" -o dics/"+name)
elif ((char != "") and (pattern == "")):
print (bg.option+"\n [*] Running command: "+bg.end+"crunch "+bg.input+minLen+" "+maxLen+bg.input+" "+char+bg.end+" -o dics/"+bg.input+name+bg.end+"\n")
os.system("crunch "+minLen+" "+maxLen+" "+char+" -o dics/"+name)
elif (pattern != ""):
print (bg.option+"\n [*] Running command: "+bg.end+"crunch "+bg.input+minLen+" "+maxLen+bg.input+" "+char+bg.end+" -t "+bg.input+pattern+bg.end+" -o dics/"+bg.input+name+bg.end+"\n")
os.system("crunch "+minLen+" "+maxLen+" "+char+" -t "+pattern+" -o dics/"+name)
# Hash Type
def HashType():
os.system("clear")
os.system("python2 tools/hashid.py")
# Dictionary Crack
def dictionary():
os.system("clear")
hash = input(bg.input+"\n [+] "+bg.blue+"Hash? >> "+bg.end)
hashType = input(bg.input+"\n [+] "+bg.blue+"Hash Encryption? >> "+bg.end)
dictionary = input(bg.input+"\n [+] "+bg.blue+"Dictionary Path? >> "+bg.end)
addOp = input(bg.input+"\n [+] "+bg.blue+"Additional options? >> "+bg.end)
f = open("hash.txt", "w")
f.write(hash)
f.close()
print (bg.option+"\n [*] Running command: "+bg.end+"john --wordlist="+bg.input+dictionary+bg.end+" --format="+bg.input+hashType+" "+addOp+bg.end+" hash.txt"+bg.option+" With Hash "+bg.input+hash+bg.end+"\n")
os.system("john --wordlist="+dictionary+" --format="+hashType+" "+addOp+" hash.txt")
os.system("rm hash.txt")
# Bruteforce Attack
def bruteforce():
os.system("clear")
brutBanner() # Display Bruteforce Banner
hash = input(bg.input+"\n [+] "+bg.blue+"Hash? >> "+bg.end)
hashType = input(bg.input+"\n [+] "+bg.blue+"Hash Encryption? >> "+bg.end)
incrementalMode = input(bg.input+"\n [+] "+bg.blue+"Incremental Mode?[] >> "+bg.end)
f = open("hash.txt", "w")
f.write(hash)
f.close()
if (incrementalMode == ""):
print (bg.option+"\n [*] Running command: "+bg.end+"john --incremental --format="+bg.input+hashType+" hash.txt"+bg.option+" With Hash "+bg.input+hash+bg.end+"\n")
os.system("john --incremental --format="+hashType+" hash.txt")
os.system("rm hash.txt")
else:
print (bg.option+"\n [*] Running command: "+bg.end+"john --incremental="+bg.input+incrementalMode+bg.end+" --format="+bg.input+hashType+bg.end+" hash.txt"+bg.option+" With Hash "+bg.input+hash+bg.end+"\n")
os.system("john --incremental="+incrementalMode+" --format="+hashType+" hash.txt")
os.system("rm hash.txt")
# Install Tools
def install():
# Install Hash Identifier
print(bg.end+bg.option+"\n [*] Installing Hash Identifier"+bg.end)
os.system("cd tools && wget https://hash-identifier.googlecode.com/files/Hash_ID_v1.1.py && mv Hash_ID_v1.1.py hashid.py")
# Install Find My Hash
print(bg.end+bg.option+"\n [*] Installing Find My Hash"+bg.end)
os.system("cd tools && wget https://findmyhash.googlecode.com/files/findmyhash_v1.1.2.py && mv findmyhash_v1.1.2.py online.py")
# Install John The Ripper
print(bg.end+bg.option+"\n [*] Installing John The Ripper"+bg.end)
os.system("sudo pacman -S john") # Archlinux
os.system("sudo apt-get install john") # Ubuntu
os.system("sudo yum install john") # Fedora
# Install Crunch
print(bg.end+bg.option+"\n [*] Installing Crunch"+bg.end)
os.system("yaourt -S crunch") # Archlinux
os.system("sudo apt-get install crunch") # Ubuntu
os.system("sudo yum install crunch") # Fedora
# Everything Done
print(bg.end+bg.option+"\n\n\n [*] Everything have been installed!"+bg.end)
# Main
def main():
os.system("clear")
lock()
time.sleep(1.5)
os.system("mkdir dics && mkdir tools")
os.system("clear")
def init():
banner()
option = input(bg.input+" [+] "+bg.blue+"Option? >> "+bg.end)
option = option.lower() # Convert user input to LowCase
option = str(option)
if (option == "1"): # Hash Type
HashType()
finish()
elif (option == "2"): # Online Crack
online()
finish()
elif (option == "3"): # Dictionary Crack
dictionary()
finish()
elif (option == "4"): # Bruteforce Crack
bruteforce()
finish()
elif (option == "5"): # List Dictionaries
dics()
init()
elif (option == "6"): # List Dictionaries
newDic()
init()
elif (option == "7"): # Install Tools
install()
finish()
elif (option == "8"): # Exit
os.system("clear")
print(bg.option+"\n Happy Hacking!"+bg.end)
time.sleep(1)
os.system("clear")
exit()
else:
os.system("clear")
print(bg.fail+"\n [!] Type 1, 2, 3, 4, 5 or 6\n"+bg.end)
time.sleep(1.5)
main()
init()
# Start
if __name__ == '__main__':
main()