#!/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
相关推荐
qq_406176149 分钟前
深入浅出 Pinia:Vue3 时代的状态管理新选择wefly201732 分钟前
m3u8live.cn 在线M3U8播放器,免安装高效验流排错learndiary32 分钟前
2026.03.12~2026.03.19制作的共7个视频及简介JiMoKuangXiangQu35 分钟前
Linux:ARM64 中断处理简析小生不才yz1 小时前
【Makefile 专家之路 | 函数篇】11. 终极奥义:eval 函数——动态生成规则的“核武器”皮卡蛋炒饭.1 小时前
进程得控制C澒1 小时前
微前端容器标准化 —— 公共能力篇:通用打印YMWM_1 小时前
Install pyrealsense2 on the jetson thor德育处主任Pro1 小时前
前端元素转图片,dom-to-image-more入门教程木斯佳1 小时前
前端八股文面经大全:小红书前端一二面OC(下)·(2026-03-17)·面经深度解析