【dasctf】easy_log

base解码可得压缩包密码

二分法盲注

python 复制代码
import urllib.parse,re
with open(r'access.log','r') as f:
    log=f.readlines()
dict1={}
count=0
#判断逻辑,最后一个fasle则取自身;最后一个为true则加1;
for each in log:
    res=re.findall(r'flag\),(\d+),1\)\)>(\d+) HTTP/1.1\" (\d+) (\d+)',urllib.parse.unquote(each))
    if res and res[0][3]=='699' :#last 404 ,the char will add to dict
        dict1[res[0][0]]=chr(int(res[0][1])+1)
    if res and res[0][3]=='704' :#last 404 ,the char will add to dict
        dict1[res[0][0]]=chr(int(res[0][1]))
        count+=1
print(dict1,len(dict1)) 
print(''.join(dict1.values()))

其实是个zip 文件

DASCTF{fd67c1798e9cb29e8fc467e9dcefbd7f}

相关推荐
用户2986985301415 分钟前
Python 将 Word 文档转换为图片的实践指南
后端·python·api
弈栈录16 分钟前
LangChain Agent 实战:快速构建可调用工具的智能体
python·架构
宸津-代码粉碎机1 小时前
Spring AI 高危CVE漏洞深度复盘|生产禁跑版本汇总+临时防御+修复方案
java·大数据·人工智能·python·spring
承渊政道2 小时前
Python IDLE鸿蒙PC适配全记录:用 ArkUI 重建编辑、运行、Shell 与基础调试闭环
python·microsoft·harmonyos·鸿蒙系统·pc端
zjh9005302 小时前
Kotlin黑科技:空安全与Java兼容性深度解析
python
黄昏恋慕黎明2 小时前
博客论坛技术迭代
python·pytest
我叫汪枫2 小时前
RAG 进阶:切分、检索、重排序,以及它和 Agent、微调、MCP 都是什么关系
开发语言·python
冰芒芒2 小时前
构建你的第一个 Agent 项目
python
gf13211112 小时前
【python_发送飞书卡片消息_直接组装JSON格式发送卡片】
python·json·飞书
lzqrzpt2 小时前
临沂LED驱动电源制造工艺解析与工程选型避坑指南
python·制造