-
Notifications
You must be signed in to change notification settings - Fork 2
How to simulate a Minerva Login with curl
Nicholas Paun edited this page Sep 8, 2016
·
1 revision
- Get the login page:
curl -D - https://horizon.mcgill.ca/pban1/twbkwbis.P_WWWLogin -b cookies.tmp -c cookies.tmp - Submit the login page:
curl -D - --data 'sid=<mcgill id goes here>&PIN=<minerva pin goes here>' https://horizon.mcgill.ca/pban1/twbkwbis.P_ValLogin -b cookies.tmp -c cookies.tmp - Get a page to prove you're logged in:
curl -D - 'https://horizon.mcgill.ca/pban1/twbkwbis.P_GenMenu?name=bmenu.P_MainMnu' -b cookies.tmp -c cookies.tmp
-
-D -: Prints headers so you can better see what Minerva is doing. -
-b: Load cookies from the filecookies.tmp. -
-c: Save cookies to the filecookies.tmp.
- Set the
Refererheader. Some Minerva functions seem to require it. - Try to echo back all the form fields received. Some pages, especially in the registration menu depend on the order of fields received and their content.