#!/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
相关推荐
chilavert31812 分钟前
技术演进中的开发沉思-284 计算机原理:二进制核心原理罗技12314 分钟前
Easysearch 集群监控实战(下):线程池、索引、查询、段合并性能指标详解XiaoYu200227 分钟前
第3章 Nest.js拦截器赵民勇28 分钟前
tr命令用法详解与技巧总结学不完的路路路28 分钟前
IMX6ULL开发板固件烧录问题:添加设备树节点不成功千寻girling34 分钟前
面试官 : “ 说一下 Map 和 WeakMap 的区别 ? ”大柏怎么被偷了37 分钟前
【Linux】进程间通信2501_9240641139 分钟前
2025年主流Web自动化测试工具功能与适用场景对比Howrun7771 小时前
Linux进程通信---6.1---进程信号屏蔽可触的未来,发芽的智生1 小时前
一万个为什么:频率和相位