#!/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
相关推荐
卷土重去7 小时前
第 6 章 Linux 实操篇-Vi 和 Vim 编辑器en.en..9 小时前
Linux 孤儿进程与僵尸进程mldong12 小时前
你的 Vue3 项目也能有钉钉同款审批流设计器:npm 装包,10 分钟画出第一条审批流2分钟速写快排13 小时前
什么是 RAG?如何用 RAG 实现一个用户记忆?passerby606114 小时前
如何自己造一个时间处理库T1mzhou14 小时前
ARM64 Linux 6.10内核启动流程7-ioremap和readl writel走到天涯海角15 小时前
react里面的长列表渲染优化小羊没烦恼!15 小时前
Hello Web API系列教程——Web API与国际化bwz999@88.com15 小时前
Ubuntu Server 24.04 设置中文北岛贰15 小时前
迷茫焦虑期,我做了一个带支付带官网的 AI 聊天虚拟恋人 App