#!/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
相关推荐
萑澈1 小时前
Windows 7 运行 Electron 安装包报“不是有效的 Win32 应用程序”怎么办君穆南1 小时前
基于 NFS 与 Rsync 实现跨服务器 Seafile 数据平滑迁移实战bloglin999991 小时前
scp、rsync远程文件同步迦南的迦 亚索的索1 小时前
LINUX环境yuanjj882 小时前
linux下调试域格CLM920 NC5等9x07平台模块 QMI拨号W.A委员会2 小时前
JS原型链详解懂懂tty2 小时前
React状态更新流程IMPYLH2 小时前
Linux 的 printenv 命令SilentSamsara2 小时前
SSH 远程管理:密钥登录 + 隧道转发,一次性配置好LN花开富贵2 小时前
【ROS】鱼香ROS2学习笔记一