#!/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
相关推荐
sorryhc5 分钟前
【AI解读源码系列】ant design mobile——Avatar头像Lethehong8 分钟前
在 CentOS 7 上搭建 OpenTenBase 集群:从源码到生产环境的全流程指南Mintopia13 分钟前
🎭 一场浏览器里的文艺复兴Mintopia13 分钟前
🎬《Next 全栈 CRUD 的百老汇》Hard but lovely14 分钟前
vim的使用AryaNimbus28 分钟前
你不知道的Cursor系列:如何使用Cursor同时开发多项目?国家不保护废物32 分钟前
Function Call与MCP:给AI插上连接现实的翅膀500佰33 分钟前
阿里Qoder AI 新开发工具,长期记忆、Wiki和Quest模式是它的独有特性Juchecar34 分钟前
Vue3 Class 和 Style 绑定详解coding随想35 分钟前
揭秘DOM键盘事件:从基础到高级技巧全解析!