Fixed prelogin location
This commit is contained in:
parent
2d1e778989
commit
41bb580c96
25
main.py
25
main.py
|
@ -33,17 +33,30 @@ Content-Type: application/x-www-form-urlencoded
|
||||||
Pragma: no-cache
|
Pragma: no-cache
|
||||||
Cache-Control: no-cache"""
|
Cache-Control: no-cache"""
|
||||||
|
|
||||||
resp = ses.post("https://alcasar-0320002d.smile-education.fr/intercept.php", data=f"challenge={challenge}&userurl=http%3A%2F%2Fdetectportal.firefox.com%2Fcanonical.html&username={username}&password={password}&button=Authentification",
|
data = f"challenge={challenge}&userurl=http%3A%2F%2Fdetectportal.firefox.com%2Fcanonical.html&username={username}&password={password}&button=Authentification"
|
||||||
|
resp = ses.post("https://alcasar-0320002d.smile-education.fr/intercept.php",
|
||||||
|
data=data,
|
||||||
allow_redirects=False, headers={"Origin": "https://alcasar-0320002d.smile-education.fr",
|
allow_redirects=False, headers={"Origin": "https://alcasar-0320002d.smile-education.fr",
|
||||||
"Referer": connection_page.url})
|
"Referer": connection_page.url,
|
||||||
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
|
||||||
|
"Sec-Fetch-Mode": "navigate",
|
||||||
|
"Connection": "keep-alive",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0",
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
"Sec-Fetch-Site": "same-origin",
|
||||||
|
"Sec-Fetch-Dest": "document",
|
||||||
|
"Accept-Language": "fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3",
|
||||||
|
"Sec-Fetch-User": "?1"})
|
||||||
|
|
||||||
print(resp.text)
|
print(resp.text)
|
||||||
redirect = resp.headers["Location"]
|
#redirect = resp.headers["Location"]
|
||||||
|
|
||||||
print(redirect)
|
#print(redirect)
|
||||||
|
print(resp.headers)
|
||||||
|
|
||||||
#print(ses.get(redirect).content.decode())
|
#print(ses.get(redirect).text)
|
||||||
|
|
||||||
#print(ses.get("http://alcasar-0320002d.smile-education.fr/status.php").content.decode())
|
#print(ses.get("http://alcasar-0320002d.smile-education.fr/status.php").text)
|
||||||
|
|
||||||
#print(ses.get(redirect).content)
|
#print(ses.get(redirect).content)
|
Loading…
Reference in a new issue