#!/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
相关推荐
行走的陀螺仪22 分钟前
JavaScript 装饰器完全指南(原理/分类/场景/实战/兼容)瘦的可以下饭了26 分钟前
3 链表 二叉树我那工具都齐_明早我过来上班31 分钟前
WebODM生成3DTiles模型在Cesium地图上会垂直显示问题解决(y-up-to-z-up)kevin_水滴石穿35 分钟前
在镜像生成时从内网获取字体安装包并配置粉末的沉淀37 分钟前
jeecgboot:electron桌面应用打包liwenzhen200538 分钟前
Linux OOM 问题之 DMSERVER 受害者1024肥宅40 分钟前
浏览器相关 API:DOM 操作全解析烟西43 分钟前
手撕React18源码系列 - Event-Loop模型