-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcrackpass.py
47 lines (45 loc) · 1.91 KB
/
crackpass.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
import os,sys,hashlib,md5,time,itertools
os.system("cls") # if windows
#os.system("clear") # if linux
print ""
print " ______ ______ ______ ______ __ __ ______ ______ ______ ______ "
print "/\ ___\ /\ == \ /\ __ \ /\ ___\ /\ \/ / /\ == \ /\ __ \ /\ ___\ /\ ___\ "
print "\ \ \____ \ \ __< \ \ __ \ \ \ \____ \ \ _'-. \ \ _-/ \ \ __ \ \ \___ \ \ \___ \ "
print " \ \_____\ \ \_\ \_\ \ \_\ \_\ \ \_____\ \ \_\ \_\ \ \_\ \ \_\ \_\ \/\_____\ \/\_____\ "
print " \/_____/ \/_/ /_/ \/_/\/_/ \/_____/ \/_/\/_/ \/_/ \/_/\/_/ \/_____/ \/_____/ "
print ""
print " CODE : Daniel Victor Freire Feitosa | @DanielFreire00"
if len(sys.argv)>=4:
hashtext = sys.argv[1]
try:
wordlist = open(sys.argv[2], "r")
except:
print "\nArquivo nao encontrado"
formato = sys.argv[3]
count=0
try:
print "\n[*] Script iniciado ..."
if formato == "md5" or formato == "MD5":
print "\n[+] Formato : MD5"
for password in wordlist:
md5file = md5.new(password.strip()).hexdigest()
if hashtext == md5file:
print "\n[+] Senha Crackeada : " + password
count=1
print ('\n[-] Termino do script : %s' % time.strftime('%H:%M:%S'))
if count == 0:
print "\n[-] Sua hash nao pode ser crackeada, tente novamente ... :("
elif formato == "sha1" or formato == "SHA1":
print "\n[+] Formato : SHA1"
for password in wordlist:
sha1file = hashlib.sha1(password.strip()).hexdigest()
if hashtext == sha1file:
print "\n[+] Senha Crackeada : " + password
count=1
print ('\n[-] Termino do script : %s' % time.strftime('%H:%M:%S'))
if count == 0:
print "\n[-] Sua hash nao pode ser crackeada, tente novamente ... :("
except KeyboardInterrupt:
print "\n[x] Saindo ..."
else:
print "\nUso : crackpass.py hash wordlist formato"