#!/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
相关推荐
Csvn6 分钟前
CSS 层叠与现代布局:BFC、@layer 与 grid/flex 的取舍CodeSheep16 分钟前
OpenJDK 全面禁止 AI 生成代码!IT_陈寒43 分钟前
为什么我的Vue组件总是莫名其妙重渲染?乘风gg1 小时前
企业级 AI Coding 的 Harness 工程实战:8 个 Skill 串起全链路草莓熊Lotso2 小时前
【Redis 初阶】Set 类型深度解析:去重集合的运算能力与实战场景张文君2 小时前
ubuntu26.04坏道坏块分区隔离急速版260831-V0.12染指11103 小时前
103.RAG-LLamaIndex后端rag问答-聊天接口东风破_10 小时前
danci 项目(三):从 JSON 数据到 AI Coding,真实项目里的数据清洗、Prompt 和工程规范东风破_10 小时前
danci 项目(一):从需求到架构,一个单词学习系统为什么会这样设计贝锐10 小时前
从国产化信创设备到商用安卓终端,向日葵如何帮助企业实现统一运维管理?