Browse the desktop is still calm,!!! Wait a minute.. Why is there a compression package?
Open a look!!! 156.txt??? waht the fuck?
The slot and the code!!!!!!.
But I don't know what ╮(╯▽╰)╭ should do!
Very simple, Python writes a zip dictionary cracker
First, we need to use the ZipFile module.
---------------Simple hack program is as follows------------------------
#-*-coding:utf-8-*-ImportZipFiledefTest (): Zipfi=zipfile. ZipFile ('Xxxxx.zip') Passfile=open ('password dictionary. txt','R') forLineinchpassfile.readlines (): Password=line.strip ('\ n') Try: Zipfile.extractall (pwd=password)Print'Found zip Password:'+word+'\ n' except: Pass
Test ()
You will not find the program run dictionary very slow!
So we're going to make a makeover.
Add a bit here, because someone might not have a dictionary, we can build one with Python!
------------Dictionary builder-------------
F=open ('Zidian.txt','W') DiC='123456'BS=[b+d+c+g forBinchDic forDinchDic forGinchDiC] forLineinchBS:PrintLine F.write ( line+'\ n')
Next we add multi-threading to the zip cracker and can let the user choose the dictionary and zip function!
------The modified code-------
ImportZipFileImportoptarges fromThreadingImportThreaddefExtractfile (Zfile,password):Try: Zfile.extractall (pwd=password)Print '[*]found Password:'+password+'\ n' except: PassdefMain (): Parse=optparges. Optionsparse ('This procedure is provided by the less than the% use method'+ '-f<zipfile>-d<xxx.txt>') parser.add_options (dest='Zname', type='string', Help='Specify ZIP file') parser.add_option ('- D', dest='dname', type='string', Help='Specify dictionary file') ) (Options,args)=Parser.parse_args ()if(options.zname=none|options.dname=None)Print. Usage exit (0) Znme=options.zname dname=Options.dnamezfile=ZipFile. ZipFile (znme) passfile=Open (dname) forLineinchpassfile.readlines (): Password=line.strip ('\ n') T=thread (target=extractfile,args=(Zfile,password)) T.start () if__name__='__main__': Main ()
Successfully run out of ZIP code, mom yes ... Inside is Yellow Book in url!!!!!
Python Write zip Cracker