-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCrackZipto.py
115 lines (97 loc) · 2.04 KB
/
CrackZipto.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
#!/use/bin/evn python3
# https://github.com/crackzipto
# Author - AnshulxD
from zipfile import ZipFile
import sys
import os
argv=False
try:
if (sys.argv[1]=="-version" or sys.argv[1]=="--version"):
print("CrackZipto - version 0.1")
argv=True
else:
pass
except:
pass
def print_help():
print("""
zipfile : Specify the zip file.
password list : Specify the password list.
help : Show help.
quit : Exit from the tool.
--version : Display the version of CrackZipto.
--help : Show help.
""")
try:
if (sys.argv[1]=="-help" or sys.argv[1]=="--help"):
print_help()
argv=True
else:
pass
except:
pass
if (argv==True):
sys.exit()
else:
pass
os.system("clear")
print("""\033[1;96m
____ _ ______ _
/ ___|_ __ __ _ ___| | __|__ (_)_ __ | |_ ___
| | | '__/ _` |/ __| |/ / / /| | '_ \| __/ _ \
| |___| | | (_| | (__| < / /_| | |_) | || (_) |
\____|_| \__,_|\___|_|\_\/____|_| .__/ \__\___/
|_|by AnshulxD
\033[0;0m""")
while(True):
try:
exit=False
action=input("\nZip file > ")
if(action=="quit"):
exit=True
break
elif(action=="help"):
print_help()
else:
pass
try:
zip=ZipFile(action,"r")
break
except:
if(action=="" or action=="help"):
pass
else:
print("\n\033[0;91m[!] Unable to locate the zip file!\033[0;0m")
except:
pass
if (exit==True):
sys.exit()
else:
pass
list=input("\nPassword list > ")
try:
word=open(list,"rb")
count=open(list,"r")
except:
print("\n\033[0;91m[!] Unable to locate the password list!\033[0;0m")
sys.exit()
print("\n")
line=count.readline()
condition=0
while(line):
password=word.readline()
try:
zip.extractall(path="Extract",pwd=password.strip())
print("\n[Password Found!] :: {}".format(password.decode()))
condition+=1
break
except:
print(password.decode())
line=count.readline()
if(condition==0):
print("\n[Password not found!]")
else:
pass
zip.close()
word.close()
count.close()