#!/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
相关推荐
A_B_C_Q13 小时前
StringBuilder 与 StringBuffer的区别颜酱13 小时前
差分数组:高效处理数组区间批量更新的核心技巧洋洋技术笔记13 小时前
vue3+vite+elementplus简单介绍Joker Zxc13 小时前
【前端基础(Javascript部分)】2、JavaScript的变量和数据类型yuki_uix13 小时前
别再死记优缺点了:聊聊 REST、GraphQL、WebSocket 的使用场景We་ct13 小时前
LeetCode 173. 二叉搜索树迭代器:BSTIterator类 实现与解析weixin_3954489114 小时前
main.c_0222cursor无尽的沉默14 小时前
Thymeleaf 表达式无尽的沉默14 小时前
Spring Boot 整合 Thymeleaf 模板引擎We་ct14 小时前
从输入URL到页面显示的完整技术流程