Security_Code/漏扫插件/弱口令检测/DataBase/CODE/zip压缩包/破解压缩包.py

31 lines
783 B
Python

# -*- coding: utf-8 -*-
# @Time : 2018/4/28 0028 11:49
# @Author : Langzi
# @Blog : www.langzi.fun
# @File : 破解压缩包.py
# @Software: PyCharm
import sys
import zipfile
from multiprocessing.dummy import Pool as tp
import time
reload(sys)
import os
sys.setdefaultencoding('utf-8')
list_pass=list(set([i.replace("\n", "") for i in open("password.txt", "r").readlines()]))
# 破解的字典名为password.txt
zip_=raw_input("set zip file:")
zname = os.path.join(os.getcwd(),zip_)
print zname
zFile = zipfile.ZipFile(zname)
def scan(passw):
try:
zFile.extractall(pwd=passw)
print '[+] Found password ' + passw + '\n'
time.sleep(50)
except Exception,e:
pass
pool = tp(processes=8)
pool.map(scan,list_pass)
pool.close()
pool.join()