#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os,sys
from unrar import rarfile
def rar_attack(file_name):
file_handle = rarfile.RarFile('test.rar')
handle_password = open('passwords.txt')
for pwd in handle_password:
pwd = pwd.rstrip()
try:
file_handle.extractall(path='test', pwd=pwd.encode())
print('Found:'+pwd)
break
except:
pass
handle_password.close()
file_handle.close()
if __name__=='__main__':
file_name = sys.argv[1]
if os.path.isfile(file_name) and file_name.endswith('.rar'):
rar_attack(file_name)
else:
print('Not RAR')
忘记rar密码python解决
拿破轮2023-08-19 12:33
相关推荐
kyriewen3 分钟前
白宫直接给 OpenAI 下了限制令,GPT-5.6 不能随便放出来了PedroQue991 小时前
Vite插件v0.2.6:架构优化与自动化升级threerocks3 小时前
什么?我连 A2A、MCP 都没学会,现在又来了 AG-UI、A2UI.牛奶3 小时前
如何自己写一个浏览器插件?亿元程序员4 小时前
为什么Cocos都4.0了还有人用2.x?MomentYY4 小时前
AI 到底是“懂”,还是在“猜”?鹏毓网络科技4 小时前
Cursor Rules 文件配置实战:3 个隐藏参数让我每月少写 40% 样板代码没烦恼3014 小时前
无痕模式下 HTTP\-First 拦截引发的“页面刷新”误判文心快码BaiduComate4 小时前
从个人提效到组织提效:Comate辅助构建自我进化的AI研发系统hunterandroid5 小时前
Compose 状态管理:remember、rememberSaveable 与状态提升