python解压带密码的压缩文件(非传统压缩)
# # -*- coding:utf-8 -*-
# @auther:LyaJpunov
# @data:2020.12.12
# 这个程序主要用于非传统加密破解,传统加密破解可以使用zipfile或者是rarfile,网上有许多的教程,不在赘述
# 这个程序主要是你大概知道多少位的密码,作者很懒,懒得写,在这里作者以6位数字密码为例
# 这种方式为暴力破解,暴力破解依赖计算机运算能力,如果密码变长,还有乱七八糟的符号。。。。那没治了(自己算一下,十位的密码,字母加数字有3656158440062976种可能,如果再长。。。)
# 可以在此基础上添加密码库进行撞库,需要一定的社工能力,作者是没找到
# 这个程序需要7zip程序的支持(可以调用命令行),其实就是调用7zip命令啦,懂的都懂。
# 安装7zip到官网下载程序,安装,Linux系统可以直接使用命令行,win系统需要添加环境变量并将7zip.exe复制到“C:\Windows”这个目录,MAC...作者很穷
# 其实很简单的就是跑7zip的程序,一直尝试直到找到解压缩的密码为止
import os
import subprocess
import zipfile
def brutecrack():
for a in range(0,9):
for b in range(0,9):
for c in range(0,9):
for d in range(0,9):
for e in range(0,9):
for f in range(0,9):
passwd=str(a)+str(b)+str(c)+str(d)+str(e)+str(f)
command='7z -P'+ passwd + ' t CarryPilot_For_LaunchPad_V1.0.zip'
#unzip只能解压 传统模式的加密方式,使用范围窄;当用户使用默认方式压缩 设置密码时,不能使用unzip命令循环爆破,所以有局限
print("$$$$$$$$$$$$$$$$$$$$$$$$")
print(passwd)
print("$$$$$$$$$$$$$$$$$$$$$$$$")
child=subprocess.call(command)
#os.popen(command)#这个也可以用,但是不好监控解压状态
print(child)
if child==0:
print("#######################")
print("密码为:"+passwd)
print("#######################")
return
if __name__ == '__main__':
brutecrack()