#!/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
相关推荐
BLUcoding12 分钟前
接口服务公网超时排查记录:SecureRandom 阻塞问题分析与解决AIgorithmGEEK15 分钟前
[Linux]从手写报头到内核套路:序列化、反序列化与自定义协议全链路Nil20823 分钟前
leetcode 139单词拆分Starry-sky(jing)27 分钟前
BUG: unable to handle kernel paging request 完整排查:dmesg 四要素与三路定罪mounter62533 分钟前
从硬件互连到操作系统变革:CXL 技术演进与 Linux 内核工程挑战回眸&啤酒鸭38 分钟前
【回眸】OpenSwarm 多智能体协作系统实战指南用户69371750013841 小时前
2026,程序员的时代拐点到了大龄秃头程序员1 小时前
一次 iBeacon + BLE 无感解锁方案的实现记录小兔子1 小时前
Python 的 GIL 与 free-threading:3.13 之后「去 GIL」走到哪一步了IT_陈寒1 小时前
SpringBoot自动配置差点让我加班到凌晨