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

相关推荐
卡次卡次11 小时前
vibecoding起步注意点:插件、Skills、MCP、Hooks
服务器·数据库·python·oracle
我的xiaodoujiao1 小时前
API 接口自动化测试详细图文教程学习系列24--如何用Pytest去设计接口测试用例并执行
python·学习·测试工具·pytest
zhangfeng11332 小时前
ai 模型加密,强化版终极防盗方案 支持烧录的显卡列表
人工智能·pytorch·python
半个落月2 小时前
深入理解 Python dict 与 set:从哈希表底层到高性能实战
python
带派擂总2 小时前
Python全栈开发 Day10_用户管理系统
python
databook2 小时前
用 SymPy 解决 Manim 曲线绘制速度不均的问题
python·数学·动效
宇宙无敌程序员菜鸟2 小时前
浅玩CRUD Agent
python
程序大视界2 小时前
【Python系列课程】Python入门教程
开发语言·人工智能·python
morning_judger2 小时前
Agent系列(二)-记忆系统的设计
开发语言·python·机器学习
RSTJ_16252 小时前
PYTHON+AI LLM DAY SIXTY-ONE
开发语言·python