資源簡介
代碼片段和文件信息
import?zipfile
#coding:utf-8
from?threading?import?Thread
import?optparse
#創建一個多線程的方法,用字典暴力破解ZIP文件密碼(如果要破解rar,只需import?rarfile模塊適當修改即可)
def?extractFile(zFilepassword):
????try:
????????zFile.extractall(pwd=password)
????????print?‘[+]found?password‘?+?password?+?‘\n‘
????except:
????????pass
????#optparse解析字符串,即可通過CMD命令執行,本例CMD執行python?threadzip27.py?-f?evil.zip?-d?dict.txt
def?main():
????parser?=?optparse.OptionParser(“usage%prog“+?\
???????????????????????????????????“-f??-d?“)
????parser.add_option(‘-f‘dest=‘zname‘type=‘string‘\
??????????????????????help=‘specify?zip?file‘)
????parser.add_option(‘-d‘dest=‘dname‘type=‘string‘\
??????????????????????help=‘specify?dictionary?file‘)
????(optionsargs)?=?parser.parse_args()
????if?(option
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????134930??2016-03-18?22:51??evil.zip
?????文件????????1582??2016-03-18?22:49??threadzip27.py
?????文件??????159478??2016-03-18?22:49??暴力破解ZIP文件密碼源碼圖解.jpg
?????文件??????????38??2016-03-18?22:35??dict.txt
- 上一篇:python分析Chrome歷史訪問記錄
- 下一篇:python 斗魚直播間爬取代碼
評論
共有 條評論