#!/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
相关推荐
憧憬成为web高手5 小时前
ACTF 12307复现2401_868534785 小时前
分析RTOS与Linux有什么区别wordbaby5 小时前
Axios 上传大文件崩溃:鸿蒙 RNOH 下 XHR 返回空响应头引发的"假失败"玛丽莲茼蒿6 小时前
Linux/Unix学习笔记(四)—— 进程管理wordbaby6 小时前
React Native 列表分页实战:下拉刷新与上拉加载的工程化方案Peace6 小时前
【Nginx】wordbaby6 小时前
脱离 Tab 栏的艺术:React Native 全屏子页面的导航架构实践网络与设备以及操作系统学习使用者7 小时前
Linux与Windows核心差异深度解析陈随易7 小时前
Redis 8.8发布,一定要更新wordbaby7 小时前
React Native 新架构落地鸿蒙:跨三端政务级应用的工程实践与深度复盘