Skip to content

Commit 464e735

Browse files
authored
Create unzip.py
1 parent 6f8fb83 commit 464e735

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

a2dp/unzip.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import optparse, zipfile
2+
from threading import Thread
3+
4+
def extrackFile(zFile, password):
5+
try:
6+
zFile.extractall(pwd=password)
7+
print("[+] Found password" + password + '\n')
8+
except:
9+
pass
10+
11+
def main():
12+
usage = ''' Zip Passeord cracker v0.1
13+
created by c0d3r
14+
email: F0c3 u
15+
################################
16+
usage:
17+
python2 unzip.py -f zipfilename.zip -d dictionary name
18+
or
19+
python unzip.py -f zipfilename.zip -d dictionary name
20+
or
21+
./unzip.py -f zipfilename.zip -d dictionary name'''
22+
parser = optparse.OptionParser(usage)
23+
parser.add_option('-f', dest='zname', type='string', help='Enter the full zip filename')
24+
parser.add_option('-d', dest='dname', type='string', help='Enter the full dictionary filename')
25+
(options, args) = parser.parse_args()
26+
if (options.zname == None) | (options.dname == None):
27+
print(parser.usage)
28+
exit(5)
29+
else:
30+
zname = options.zname
31+
dname = options.dname
32+
zFile = zipfile.ZipFile(zname)
33+
passFile = open(dname)
34+
for line in passFile.readlines():
35+
password = line.strip('\n')
36+
t = Thread(target=extrackFile, args=(zFile, password))
37+
38+
if __name__ == '__main__':
39+
main()

0 commit comments

Comments
 (0)