#!/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
相关推荐
尤老师FPGA5 小时前
petalinux修改设备树添加vdma生成linux系统月山知了5 小时前
linux kernel component子系统:基于rk3588 Android 14 kernel-6.1 display-subsystem代码分析_Emma_5 小时前
【QCOM】 Linux下qcom venus 编解码驱动框架分析ZPC82105 小时前
如何创建一个单例类 (Singleton)紫_龙5 小时前
最新版vue3+TypeScript开发入门到实战教程之重要详解readonly/shallowReadOnly不才小强6 小时前
Linux系统常用命令roamingcode7 小时前
前端 AI Agent 多智能体协作架构:从对抗式排查到工作流解耦SPC的存折7 小时前
8、Ansible之Playbook---RolesKira Skyler7 小时前
BPF KPROBE编程中的ctx是什么?蓝莓味的口香糖8 小时前
【vue】初始化 Vue 项目