#!/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
相关推荐
道川贤林11 分钟前
OrangePi 系统启动优先级修改甲维斯19 分钟前
GLM5.2超过Opus4.8Think,全球第二了!by————组态22 分钟前
Ricon组态系统 - 新一代Web可视化组态平台JieE21222 分钟前
手把手带你用纯 CSS 实现一个 3D 旋转魔方,这些前端基础你能打几分?lichenyang45335 分钟前
鸿蒙 Web 容器(二):H5 和 ArkTS 说话前,先定一份「协议」JYeontu38 分钟前
开箱流水加载动画RANxy39 分钟前
AntV 入门系列:G6 图可视化实战尽欢i41 分钟前
Vue3 customRef 封神教程:防抖、本地存储、自动埋点一套搞定,模板干干净净xsc-xyc42 分钟前
用 Tailscale + Syncthing 实现手机、电脑与 NAS 的跨网络文件同步