39425b64d481395585f582cde22ccd30312.gif
测试demo demo.zip
demo.zip
其他密码字典 密码字典.zip
密码字典.zip

import zipfile
import threading


txt="2016passworddic.txt"#密码字典
z="1.zip"                #需要破解的zip文件

xc=1                     #线程数量

print("zip暴力爆破脚本")
print("AEXEGEEK_无闻风")
print("当前线程:"+str(xc))
print("当前字典:"+txt)
print("zip文件:"+z)
print("开始爆破。。。。")

z_file=zipfile.ZipFile(z,"r")

f = open(txt, "r")
lines=f.readlines()#所有行的数组

all_lines=len(lines)-1#总行数

dz = round(all_lines/xc) #f范围递增数

A=0
B=0

def pojie(n,b,xcname):
    for paw in range(n,b):
        #print(lines[paw].strip('n'))

        try:
            z_file.extractall(pwd = lines[paw].strip('n').encode())
            print("成功----:"+lines[paw])
            input()
            break
        except:
            pass

    #print("失败")  




for i in range(0,xc):
    #print(i)
    A=B
    #print(A)
    if i==xc-1:
       B=all_lines
    else:
        B=B+dz    
    #print(B)
    xiancheng=threading.Thread(target=pojie,args=(A,B,i))
    xiancheng.start()




#print (dz)
#print (lines[dz])

#print(len(lines))
#print(lines[565263])



f.close()
Last modification:August 24th, 2020 at 08:29 am
如果觉得我的文章对你有用,请随意赞赏