虽说是暴力破解,但是几率不大,除非密码相对简单,否则时间成本根本花不起,密码本里面包含的也有限,只是思路,可以一试。
密码本链接:https://pan.baidu.com/s/15fZ3fEDKbXk04vcYQr4TtA
提取码:098k
破解rar文件代码
import rarfile,zipfile,os,shutil
from pathlib import Path
from tqdm import tqdm
zip_file = "data.zip"
wordlist = "rockyou.txt"
fileget=rarfile.RarFile(zip_file)
n_words = len(list(open(wordlist, "rb")))
# 打印密码总数
print("Total passwords to test:", n_words)
with open(wordlist, "rb") as wordlist:
for word in tqdm(wordlist, total=n_words, unit="word"):
try:
fileget.extractall(pwd=word.strip())
exce