【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}

相关推荐
whcyhhh6 分钟前
头歌实践教学平台:大数据存储2023(六)
大数据·数据库·python
for_ever_love__41 分钟前
python基础语法学习: 闭包
开发语言·python·学习·闭包
ly76891 小时前
Python 全面入门:从核心语法到工程实践
开发语言·python
Niuguangshuo2 小时前
DeepFilterNet 3:端侧实时全带降噪的开源标杆
python
第一程序员3 小时前
AI 辅助编程的 7 个误区:把模型当高级搜索引擎是对它的最大浪费
python·rust·github
Groundwork Explorer4 小时前
W5500 网卡编程初始化与使用指南
python·单片机
逸Y 仙X5 小时前
MCP(模型控制协议)完全指南:从核心概念到实战开发
python·大模型·llm·ai编程·mcp
WILLF5 小时前
前端视角:Python requests vs JS axios
前端·python
哒哒哒5285205 小时前
69. Python: 核心语法-面向对象基础-案例(教务系统)
python
何以解忧,唯有..5 小时前
Python 中获取目录操作完全指南
windows·python·microsoft