python爆破zip脚本

 最近在提高自己编程能力,拿一些实用的小工具练下。该脚本为python语言,主要涉及模块zipfile,threadings模块。

功能:暴力猜解zip解压密码

#coding: utf-8

import zipfile
import threading

def zipbp(zfile, pwd):
    try:
        zfile.extractall(pwd=pwd)
        print 'password found : %s' % pwd
    except:
        return
def main():
    zfile = zipfile.ZipFile('c.zip')
    pwdall = open('aa.txt')
    for pwda in pwdall.readlines():
        pwd = pwda.strip('\n')
        t = threading.Thread(target=zipbp, args=(zfile, pwd))
        t.start()
        t.join()
if __name__ == '__main__':
    main()

posted @ 2016-12-21 00:09  cui0x01  阅读(2032)  评论(0编辑  收藏  举报