mirror of
https://github.com/hastagAB/Awesome-Python-Scripts.git
synced 2024-11-23 20:11:07 +00:00
Create setup.py
This commit is contained in:
parent
d60e41a8e4
commit
3c5818c931
45
zip_password_cracker/setup.py
Normal file
45
zip_password_cracker/setup.py
Normal file
|
@ -0,0 +1,45 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
print '''
|
||||
Free anyZipcrack-dictionary created by:
|
||||
pyc0d3r: http://www.umarbrowser.co.vu/
|
||||
'''
|
||||
#imports
|
||||
import zipfile
|
||||
import optparse
|
||||
from threading import Thread
|
||||
#Try extarct if found password
|
||||
def extractFile(zFile, password):
|
||||
try:
|
||||
zFile.extractall(pwd=password)
|
||||
print '[+] Found password ' + password + '\n'
|
||||
except:
|
||||
pass
|
||||
# main thats gives an interace using optparse
|
||||
def main():
|
||||
parser = optparse.OptionParser("usage %prog "+\
|
||||
"-f <zipfile> -d <dictionary>")
|
||||
parser.add_option('-f', 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 parser.usage
|
||||
exit(0)
|
||||
else:
|
||||
zname = options.zname
|
||||
dname = options.dname
|
||||
|
||||
zFile = zipfile.ZipFile(zname)
|
||||
passFile = open(dname)
|
||||
|
||||
for line in passFile.readlines():
|
||||
password = line.strip('\n')
|
||||
t = Thread(target=extractFile, args=(zFile, password))
|
||||
t.start()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Reference in New Issue
Block a user