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

相关推荐
咖啡の猫2 小时前
搭建Python开发环境
开发语言·python
听风吟丶4 小时前
Java 8 Stream API 高级实战:从数据处理到性能优化的深度解析
开发语言·python
文人sec5 小时前
pytest1-接口自动化测试场景
软件测试·python·单元测试·pytest
secondyoung7 小时前
Mermaid流程图高效转换为图片方案
c语言·人工智能·windows·vscode·python·docker·流程图
nini_boom7 小时前
**论文初稿撰写工具2025推荐,高效写作与智能辅助全解析*
大数据·python·信息可视化
1***s6328 小时前
Python爬虫反爬策略,User-Agent与代理IP
开发语言·爬虫·python
咖啡の猫8 小时前
Python的自述
开发语言·python
重启编程之路9 小时前
python 基础学习socket -TCP编程
网络·python·学习·tcp/ip
云和数据.ChenGuang10 小时前
pycharm怎么将背景换成白色
ide·python·pycharm