#!/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
相关推荐
song85818 分钟前
韦东山开发手册阅读笔记(五)LIZhang201622 分钟前
linux写一个脚本实时保存内存占用情况小李子呢021123 分钟前
前端八股2---Proxy 代理IDC02-阿杰34 分钟前
Windows WSL2安装Ubuntu24.04全攻略bjzhang7544 分钟前
使用 HTML + JavaScript 实现组织架构图s09071361 小时前
ZYNQ7000 AXI DMA 接收中断(S2MM_introut)全解析:从硬件原理到Linux驱动开发军军君011 小时前
Three.js基础功能学习十六:智能黑板实现实例三camellias_1 小时前
ubuntu(二)ubuntu18.04安装mysql8海上彼尚1 小时前
SVG矢量图形快速入门藤谷性能1 小时前
Ubuntu 22.04:安装串口调试助手CoolTerm