.zip爆破
.zip爆破
Python的优化问题
Python在计算密集型任务方面没有明显的多线程优化,多线程更加适合用于处理I/O密集型任务(如网络请求)。爆破任务使用顺序执行即可。
编写Python脚本
一个简单的爆破脚本:
import zipfile
import traceback
import shutil
import os
#加载字典
def read_dicts(filename):
dicts=[]
with open(filename,'r')as fp:
dicts=[pwd.strip() for pwd in fp.readlines()]
return dicts
#解压缩功能
def blast(zip_file,pwd):
try:
zip_file.extractall('./temp',pwd=pwd.encode())
return pwd
except Exception as e:
if 'Bad password' in str(e):
return False
traceback.print_exc()
if __name__=='__main__':
dict_file='./zip_dict.txt'
zip_file=zipfile.ZipFile('./test.zip')
for password in read_dicts(dict_file):
result=blast(zip_file,password)
if result:
print(f'[+] get pasword: {result}')
break
else:
print('[-] not found')
shutil.rmtree('./temp')
os.mkdir('./temp')
测试
提供了一份实验文件。
.zip爆破的更多相关文章
- optparser模块 与 ZIP爆破(Python)
optparser模块: 为脚本传递命令参数. 初始化: 带 Usage 选项(-h 的显示内容 Usage:): >>> from optparse import OptionPa ...
- Go黑帽子
使用go语言来实现python黑帽子和绝技的代码 1.unix密码破解器 package main import( "bufio" "flag" "i ...
- buuctf misc 刷题记录
1.金三胖 将gif分离出来. 2.N种方法解决 一个exe文件,果然打不开,在kali里分析一下:file KEY.exe,ascii text,先txt再说,base64 图片. 3.大白 crc ...
- BUUCTF-Misc-No.1
# BUUCTF-Misc # 签到 flag{buu_ctf} 金三胖 说实话直接看出来flag{he11ohongke} 二维码 直接binwalk扫一下,-e分离就出来一个带锁的zip爆破一下就 ...
- misc刷题
前言:听说misc打得好,头发多不了 kali自带的字典: cd /usr/share/wordlists/ 字典网站:http://contest-2010.korelogic.com/wordli ...
- Super-Mario-Host(超级玛丽)靶机
仅供个人娱乐 靶机百度云下载 链接:https://pan.baidu.com/s/13l1FUgJjXArfoTOfcmPsbA 提取码:a8ox 一.主机发现 arp-scan -l 二.漏洞扫 ...
- python zip文件密码爆破
#!/usr/bin/env # coding=UTF-8 import zipfile import threading import os import sys class CrackZip: d ...
- 破解压缩包的几种方式(zip伪加密 爆破 CRC32碰撞 已知明文攻击)
zip伪加密 zip文件是由3部分组成,详见文末 压缩源文件数据区+压缩源文件目录区+压缩源文件目录结束标志 在压缩源文件数据区有个2字节的 全局方式位标记 ,在压缩源文件目录区也有个2字节的 全局方 ...
- python爆破zip脚本
最近在提高自己编程能力,拿一些实用的小工具练下.该脚本为python语言,主要涉及模块zipfile,threadings模块. 功能:暴力猜解zip解压密码 #coding: utf-8 impor ...
随机推荐
- codeforces 8B
B. Obsession with Robots time limit per test 2 seconds memory limit per test 64 megabytes input stan ...
- 014.NET5_MVC_Razor扩展Html控件02
第二种方法: 通过一个后台方法,返回一个不存在的html标签字符串,在读取的时候,通过后台方法去渲染成需要的标签和内容: 1. 定义一个普通类,类名称建议以TagHelper结尾,并且给类添加特性[H ...
- Apple iOS 触控按钮 自动关闭 bug
Apple iOS 触控按钮 自动关闭 bug bug 轻点 iPhone 背面可执行操作 您可以轻点两下或轻点三下 iPhone 背面以执行某些操作,如向上或向下滚动.截屏.打开"控制中心 ...
- React & Special Props Warning
React & Special Props Warning key & ref demo index.js:1 Warning: Comment: key is not a prop. ...
- 析构函数 & 构造函数
析构函数 & 构造函数 C++ 析构函数(destructor) 与构造函数相反,当对象结束其生命周期,如对象所在的函数已调用完毕时,系统自动执行析构函数. 析构函数往往用来做"清理 ...
- web development all in one
web development all in one https://javascript.xgqfrms.xyz/web-development-all-in-one.html refs https ...
- JavaScript Number Type Checker
JavaScript Number Type Checker Number.isInteger // static 方法 Number.isInteger(value) https://develop ...
- web cache & web storage all in one
web cache & web storage all in one web cache in action web cache best practices web storage in a ...
- iframe 父子互传消息,父页面滚动,子页面触发父页面高度
https://blog.csdn.net/qq_38366657/article/details/81538145 // 父页面的js<iframe id='TopHeader' src=&q ...
- 对Map进行复合操作(读写)且并发执行时,无法保证业务的行为是正确的,对读写操作进行同步则可以解决。
ConcurrentHashMap通常只被看做并发效率更高的Map,用来替换其他线程安全的Map容器,比如 Hashtable和Collections.synchronizedMap.线程安全的容器, ...