#!/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
相关推荐
枳实-叶16 小时前
【Linux驱动开发】第一天:用户态与内核态通俗讲解+最简字符设备驱动实战计算机安禾17 小时前
【Linux从入门到精通】第23篇:条件判断——让脚本拥有“大脑”菜鸟小码17 小时前
MapReduce 核心阶段深度解析:Map 阶段与 Reduce 阶段的作用及执行流程步步为营DotNet17 小时前
深入剖析.NET 11 中 Semantic Kernel 于智能后端集成的创新实践feng_you_ying_li17 小时前
linu之进程的程序替换与shell基本实现的基本版本@大迁世界17 小时前
33.如何在 React 中使用内联样式(inline styles)?CodeSheep17 小时前
DeepSeek的最新招人标准,太讽刺了。念恒1230617 小时前
进程控制---进程程序替换不法17 小时前
vue 地图路线渲染GISer_Jing17 小时前
从“工具应用”到“系统重构”:AI时代前端研发的范式转移与哲学思辨