#!/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
相关推荐
楚枫默寒5 小时前
Linux 编辑文件后自动添加修改日期夜焱辰6 小时前
浏览器端 Agent 的文件版本管理:不用 Git,基于 OPFS + SQLite 自己造了一个梦想的颜色6 小时前
TypeScript 完全指南(下):从类型体操到生产级配置2601_961194027 小时前
27考研刘晓艳单词pdfHi~晴天大圣8 小时前
npm使用介绍888CC++8 小时前
如何在 C 语言中进行程序调试?喵个咪9 小时前
基于 Taro 的 Headless CMS 多端前端架构:技术解析与二次开发导引狂炫冰美式9 小时前
你还在古法PPT吗,试试HTML呢?免费编辑导出工具给 xdm 放这了2023自学中9 小时前
imx6ull 开发板 推流ov5640数据,虚拟机用 ffplay 拉流播放万少9 小时前
未来组织的分水岭不是员工数量,而是人才密度