#!/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
相关推荐
shawxlee36 分钟前
vue3在public下封装config.js自定义配置动态数据,可在打包后直接修改,方便后端部署及后续维护Kina_C1 小时前
Linux iptables 防火墙原理与实操——从四表五链到 NAT 配置用户059540174461 小时前
把记忆存储的回归测试从手工换成 Playwright + GitHub Actions,线上缺陷降低 80%触底反弹1 小时前
🚀 从 DOM0 级到 React 合成事件:前端事件监听的 20 年演进史kyriewen1 小时前
我给前端项目的接口请求套了6层保护——才发现以前一直在裸奔颜酱1 小时前
04 | 召回前置准备:搭好召回所需的四个数据库wdfk_prog1 小时前
嵌入式面试真题第 15 题:不可恢复异常后的通用崩溃快照、调用栈保存与离线分析架构郝亚军3 小时前
如何安装webstorm、Node.js和vue CLIIT_陈寒3 小时前
React的useEffect依赖项把我坑惨了东方小月3 小时前
从零开发一个Coding Agent:monorepo项目搭建