File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
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 ()
You can’t perform that action at this time.
0 commit comments