#!/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
相关推荐
CHANG_THE_WORLD1 小时前
12.总结:深入理解 Linux I/O 多路复用:select、poll、epoll 全解析风曦Kisaki1 小时前
# Linux笔记:操作系统优化与资源管理谷哥的小弟1 小时前
TypeScript对象类型稚南城才子,乌衣巷风流2 小时前
函数:编程中的核心概念Mr.HeBoYan2 小时前
一次持续三天才出现的丢包故障——深入解析 DPDK Memory Ordering、rte_ring 与 CPU Memory Barrier (下)IT_陈寒2 小时前
为什么我的JavaScript异步代码总是不按顺序执行?索西引擎3 小时前
【React】useState 状态更新机制:批量更新策略与“异步“错觉的深层解析慢功夫3 小时前
💡第五篇:VSCode插件是如何与主进程通信的?锋行天下3 小时前
打造企业内部知识库系统RAG全栈项目竹林8183 小时前
用 ethers.js 连接 MetaMask 实现钱包登录:一个真实项目中的完整踩坑记录