tft每日頭條

 > 圖文

 > python壓縮包解密代碼

python壓縮包解密代碼

圖文 更新时间:2024-09-27 01:36:01


python壓縮包解密代碼(python破解zip密碼)1


今天寫了個小腳本,用于暴力破解zip密碼

import zipfile from threading import Thread import optparse def testZipPasswd(zfile,passWord): try: zfile.extractall(pwd=passWord) print("[ ] Found Password: " str(passWord,encoding="utf-8")) except Exception as e: #print(e) pass def decodeZipPasswd(zfile,passfile): with open(passfile) as f: zfile = zipfile.ZipFile(zfile) for i in f.readlines(): i = i.replace("\n","") t = Thread(target=testZipPasswd,args=(zfile, i.encode(encoding="utf-8"))) t.start() if __name__ == "__main__": parser = optparse.OptionParser("python zip.py -f <zipfile> -p <passfile>") parser.add_option("-f",dest='zname',type='string',help='specify zip file') parser.add_option("-p",dest='passwd',type='string',help='specify password file') (options,args) = parser.parse_args() if options.zname ==None or options.passwd==None: print(parser.usage) exit(0) else: decodeZipPasswd(options.zname,options.passwd)

,

更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!

查看全部

相关圖文资讯推荐

热门圖文资讯推荐

网友关注

Copyright 2023-2024 - www.tftnews.com All Rights Reserved