首页
/
每日頭條
/
圖文
/
python壓縮包解密代碼
python壓縮包解密代碼
更新时间:2026-01-21 20:01:28


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)

,
Comments
Welcome to tft每日頭條 comments! Please keep conversations courteous and on-topic. To fosterproductive and respectful conversations, you may see comments from our Community Managers.
Sign up to post
Sort by
Show More Comments
推荐阅读
時間無價人生有價的文案
時間無價人生有價的文案
時間無價人生有價的文案?黃金易得,知己難求漫長的一生中,你總會遇見孤軍奮戰的時候,在這場隻有你的戰争中,注定要單槍匹馬正因如此,若有一知己,此生而無憾相識滿天下,知心能幾人?有人說知己就是遇見另一個自己,彼此默默會議,悉心聆聽,在靈魂裡琴瑟...
2026-01-21
法律上特别程序都有哪些
法律上特别程序都有哪些
民事特别程序是指人民法院審理某些非民事權益糾紛案件所使用的特殊程序,此程序與民事簡易程序和民事普通程序所對應。人民法院适用特别程序審理選民資格案件、宣告失蹤或者宣告死亡案件、認定公民無民事行為能力或者限制民事行為能力案件、認定财産無主案件、...
2026-01-21
抖音上很火的帶字潮圖
抖音上很火的帶字潮圖
最近抖音上面很火的紋身小姐姐壁紙,
2026-01-21
文化創新與文化創造有何不同
文化創新與文化創造有何不同
文化創新與文化創造有何不同?作者:管甯(福建省中國特色社會主義理論體系研究中心研究員),我來為大家講解一下關于文化創新與文化創造有何不同?跟着小編一起來看一看吧!文化創新與文化創造有何不同作者:管甯(福建省中國特色社會主義理論體系研究中心研...
2026-01-21
u盤格式化以後變小了
u盤格式化以後變小了
U盤是我們常常會使用到的移動儲存設備,雖然它很好用,但是有時候它也會出現問題,最常見的就是格式化後容量變小了,那麼當你遇到U盤格式化後容量變小怎麼辦?不知道的朋友趕緊看看可可整理的U盤格式化後容量變小的解決方法吧!方法/步驟:1、下載USB...
2026-01-21
Copyright 2023-2026 - www.tftnews.com All Rights Reserved