Ankit wrote a nice post about using Java to fill up a form, which is a FCFS allocation (can’t they just *provide* a quantity of good courses?). However, filling up the form can be simply done by a Firefox extension, Autofill forms; but what I would really like to do is be sleeping while the course registration goes on.
Ingredients: Firefox, bash, curl, a bit of common-sense
1) First of all, install two Firefox extensions – Web Developer and Firebug.
2) Fill up the form that you’re going to fill up. (don’t get lost in recursion here!)
3) Follow the screenshot below and convert POST to GET.

4) Now open up Firebug console (press F12), select the Net tab, and enable it.

5) Now click on Submit:
Ignore the “Registration is currently closed”, look at the console, you’ll have a big url that corresponds to your choices, just copy it.

It will be of the form:
<url>?<data>
6) To simulate this form submission, you’ll need this command:
curl <url> -d <data> -k -L
7) However, there is a problem, you have to authenticate first. No sweat:
curl https://isas/validate.php -d ‘StUdent=username&searchin=200&password=password&submit=Submit’ -c cookies.txt -k -L
This will save the login cookies in a file named cookies.txt
So now we finalize the script:
#!/bin/bash
while (( 1 ))
do
curl https://isas/validate.php -d ‘StUdent=username&searchin=200&password=pass&submit=Submit’ -c cookies.txt -k -L #Change username and pass accordingly
curl https://isas/registration/updateSpecialReg.php -d <data> -k -L -b cookies.txt
sleep 5s #We don’t wanna hammer the server down
done
While I sleep on.
PS0: If you can’t get this to work, read about HTTP 402.
ShArK said
You definitely need a girl friend. No doubt about it!
Now why don’t you do the same thing using greasemonkey ? it might be fun
gaganpreet said
I’ve already tried using greasemonkey. It wasn’t as slick as this.
ZenWalker said
Now both of u need GFs
gaganpreet said
From what information I have, Rishabh doesn’t. And I really don’t care.
ajay said
Nice
. If only I knew this in my 4-1.
Dr. Manhattan said
Why do you all ppl abide by the rules of isas ?
I remember a quote from “Matrix”:
These rules are no different than those of a computer system.
Some of them can be bent.
Others . . .
. . . can be broken.
/*Post edited by admin*/
gaganpreet said
@Ajay So you were sleeping while the registration was going on?
@Dr. Manhattan Sorry dude, information about SQL injections might be dangerous so I had to edit your comment.
MaVeRiK said
I just cant imagine…. what will happen at the next Registration….
Poor ISAS !!
gaganpreet said
Anti-bot measures.
)
A Course submission by a ‘Human’! « Pensieve said
[...] first serve, though I highly doubt if there is any such person out here ). What followed was a post by our very own geeking (geek-king, I hope it doesn’t offend you ) gagan, and whoa! that was [...]
Sambhav said
Curious to know wht happens to ISAS the next sem and who gets what course if every one uses the same script (except the one having more smarter Hacks
)… I guess , it’ll finally be down some random allocation
gaganpreet said
I won’t know, I’ll be sleeping while the registration goes on.
ShArK said
I was submitting some grades to in the office today and told Appaji about your script. He was NOT happy about it and was asking whodunnit !!!
gaganpreet said
Why you ungrateful little…
jack said
very nice info…let me add my 2 cents to this blog by sharing a really good resource of firefox add-ons to save online privacy. look http://appslog.com/blog/1-blog/821-20-firefox-addons-for-saving-your-online-privacy.html
they are sharing a nice set of addons.