#!/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
相关推荐
乐观主义现代人7 分钟前
go 面试x***13397 分钟前
如何在Linux中找到MySQL的安装目录4***175412 分钟前
linux 网卡配置1***Q78429 分钟前
前端在移动端中的离线功能星环处相逢32 分钟前
Nginx 优化与防盗链及扩展配置指南2501_9418868641 分钟前
多语言微服务架构下的微服务熔断与限流优化实践tsumikistep42 分钟前
【前后端】Vue 脚手架与前端工程结构入门指南在繁华处1 小时前
JAVA实战:文件管理系统1.0GISer_Jing1 小时前
SSE Conf大会分享支付宝xUI引擎:AI时代的多模态交互革命Aerelin1 小时前
爬虫playwright中的资源监听