0

I'm trying to build a bot that will parse the list of classes offered by my university and let me know when the one I'm looking for is open. The problem is that in order to get to the registration/search box, I have to log in with my university username and password. I'm trying to figure out what protocol that my school uses to authenticate me so I can give my bot my credentials and let it log in for me so it can access the registration/search page, so how can I figure out what they are using so I can figure out how to implement it in whatever language I decide to use. I've gone through packet captures but all I can see is the SSL syn/ack, which I guess is the point of SSL haha.

Can anyone recommend how to figure out what protocol my school uses to log in users?

  • 1
    Careful. Most schools will not be happy with you doing this kind of thing. – Kieveli Nov 28 '13 at 19:56
  • This could be considered unauthorized access, meaning it could be illegal. – Andy Sep 21 '17 at 21:20
2

Two authorization mechanisms are commonly used:

  • Session cookies – inspect your request headers and find out which are actually relevant.
  • HTTP authorization – noticeable when the browser, not the website prompts you for credentials. Also, the Authorization header should be quite visible when you inspect the headers with your web browser.

E.g. in Chrome, open the developer tools and load a protected page while the “Network” tab is opened. Similar for Firefox or IE.

In most cases, it is actually easier to have your bot log into the page itself, rather than always feeding it up-to-date authorization tokens. Depending on what language you are using, you might enjoy the Selenium bindings. With Perl, Mechanize::Firefox is another good option.

  • That's a really good idea, it's more confusing and definitely bad practice to try to steal my own cookies. I'm starting to think javascript would be the ideal language to do this in. I would be able to log myself in at the site like normal, then read the cookies and do the rest from javascript, right? Or would I log in, then re-request a cookie from javascript? – jamzsabb Nov 29 '13 at 5:50
  • You know.....I think I'm making this overcomplicated. All I need to do is go to the page in my browser, then open the script with my browser and let it do its thing. I think. It may be obvious that I haven't had time to code for a while now lol – jamzsabb Nov 29 '13 at 5:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.