#!/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
相关推荐
mCell4 小时前
GSAP ScrollTrigger 详解gnip4 小时前
Node.js 子进程:child_processexcel7 小时前
为什么在 Three.js 中平面能产生“起伏效果”?excel8 小时前
Node.js 断言与测试框架示例对比天蓝色的鱼鱼10 小时前
前端开发者的组件设计之痛:为什么我的组件总是难以维护?codingandsleeping10 小时前
使用orval自动拉取swagger文档并生成ts接口石金龙11 小时前
[译] Composition in CSS白水清风11 小时前
微前端学习记录(qiankun、wujie、micro-app)Ticnix11 小时前
函数封装实现Echarts多表渲染/叠加渲染用户221520442780011 小时前
new、原型和原型链浅析