#!/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
相关推荐
lili-felicity13 小时前
React Native for Harmony:登录页“记住密码+深色模式适配”完整实现摘星编程13 小时前
Flutter for OpenHarmony 实战:CustomScrollView 自定义滚动视图详解xiaomin-Michael13 小时前
websocket学习xiaomin-Michael13 小时前
JS setTimeoutconfiself13 小时前
前端代码渲染截图方案xkxnq13 小时前
第二阶段:Vue 组件化开发(第 21天)南烟斋..13 小时前
Linux系统编程核心知识指南wayne21413 小时前
Zustand在ReactNative中的工程实践与性能优化总结阿珊和她的猫13 小时前
深入理解 React 中的 Render Props 模式