Robot form submission – Part 2

Aug 12 2009

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. :D

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
8) 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.

14 responses so far

[Tag] F.A.Q.

Jun 12 2009

Tagged by Karan. Apparently he has nothing better to do than surf the web all day. :P

  1. When you looked at yourself in the mirror today, what was the first thing you thought?
    I need to replace this broken one.
  2. How much cash do you have in your wallet right now?
    Rs. 700.
  3. What’s a word that rhymes with DOOR?
    chor
  4. Who is the 4th person on your missed call list on your cell phone?
    Avi Dullu
  5. What is your favorite ring tone on your phone?
    Always keep my cell in silent mode.
  6. What are you wearing right now?
    T-Shirt and Capri.
  7. Do you label yourself?
    Somewhat.
  8. Name the brand of the shoes you’re currently own?
    Woodland, Reebok
  9. Bright or Dark Room?
    Dark one. Though wouldn’t mind one with a switch. :P
  10. What do you think about the person who took this survey before you?
    Hardworking (Early to bed, early to rise) :P
  11. What does your watch look like?
  12. What were you doing at midnight last night?
    Having a nap
  13. What did your last text message you received on your cell say?
    A phonecard message.
  14. What’s a word that you say a lot?
    Nothing strikes as of now.
  15. Who told you he/she loved you last? (please exclude spouse , family, children)
    Ouch. This hurt.
  16. Last furry thing you touched?
    A stuffed animal.
  17. Favorite age you have been so far?
    The school age.
  18. What was the last thing you said to someone?
    so kar utha hoon.
  19. The last song you listened to?
    Currently listening to A Movie Script Ending by Death Cab For Cutie.
  20. Where did you live in 1987?
    Born in 1988. :P
  21. Are you jealous of anyone?
    Not really.
  22. Is anyone jealous of you?
    Who cares? It’s their problem.
  23. Name three things that you have on you at all times?
    Watch, my ever wandering and lost thoughts, ready-to-kick-you-if-you-annoy-me attitude.
  24. What’s your favorite town/city?
    The tricity (Chandigarh, Mohali, Panchkula)
  25. When was the last time you wrote a letter to someone on paper and mailed it?
    Never, I guess. :D
  26. Can you change the oil on a car?
    With the manual. :P
  27. Your first love/big crush: what is the last thing you heard about him/her?
    No idea where she is, deleted her orkut account long time back.
  28. Does anything hurt on your body right now?
    My ass. Been sitting for the last 2 hours.
  29. What is your current desktop picture?
    From the KDE4 wallpaper set: Fields of Peace.
  30. Have you been burnt by love?
    What does this mean?

8 responses so far

Authorization required

Mar 29 2009

What word comes to your mind when you open a session like this?

FUCK!

PS0: Didn’t know the music was also being recorded. But I suppose adds a nice touch. :D

PS1: If anyone has an idea how to reset my session, it would be appreciated.

10 responses so far

Research

Mar 24 2009

A chat transcript with an Anonymous Researcher (who insisted on being so), henceforth referred to as AR.

1:56 AM

AR: there ??
we have a small problem

me: Yeah
Hmm?

AR: there is a series called “The Unit”
uske seasons 2,3 and 4 hain
unfortunately season 1 nahin hai

me: ye problem hai? :P

AR: it’s a pretty good series…
it’s a serious problem…..
for research students
you have no idea how hard it is to do research without good series to watch

me: seriously.. rofl :P
I thought ki kuch ho gaya types :P

AR: it’s true man
if and when you do research you will realise it..
no series => no research

me: :P

AR: i submitted a paper to an A+ conference and it was made possible only by watching the west wing
woh bhi just the first 4 seasons
imagine if i had watched the 3 other seasons….

me: You know what.. I’ll blog about this :P

AR: turing award winning kaam kar liya hota….
dude..
it’s a well known fact

me: I’m not arguing :P

AR: ok

17 responses so far

[Tag] PhotoWalk near Mahendra Hills (Anand Buddha Vihar)

Mar 18 2009

This Sunday, we went to Anand Buddha Vihar as part of activities of the Photography Club. If you want to read the description about the trip, you can read that on Kulbir Saini’s blog.

Here are some of the pictures that I and Vidit took during the trip:

13 responses so far

Top Playlist

Mar 13 2009

Tagged by Karan.

Thanks to last.fm! The top most ten songs scrobbled in my playlist are:

1
299
2
288
3
245
4
225
5
208
6
207
7
204
8
187
9
185
10
177

Not necessarily my favourite tracks, which (after a lot of confusion :( ) I would list as:

Matchbox TwentyUnwell
David GrayBabylon
Goo Goo DollsIris
Vertical HorizonYou’re a God
Third Eye BlindDeep Inside of You
Rage Against the MachineKilling in the Name
Nine Inch NailsRight Where It Belongs
Craig DavidRise And Fall (Ft. Sting)
ToolLateralus
ColdplaySpeed of Sound

The top scrobbled artists in my playlist are:

1
2,696
2
2,483
3
2,106
4
1,519
5
1,465
6
1,318
7
1,315
8
1,296
9
1,013
10
996

PS0: A post long time coming. :)

PS1: I tag Aakanksha, Sanrag, Vishnu Fafat, Kulbir, Aniket.

5 responses so far

February post

Feb 26 2009

I just logged into wordpress yesterday and realised it’s been a month since I blogged. And with February about to get over, I thought it would be good to have at least one post this month, however small as it may be (considering the last few posts I’ve been writing :D )

This happened in Parallel Programming class, Prof. Govindrajulu was calling out names of those who had not submitted the assignment. He called out this guy’s name (which I’ve again forgotten). I asked Kshitij, “He’s an M. Tech. guy, isn’t he?”. And the reply I get: No, he’s doing MS. He lives next to your room, buddy!

I was like, wtf. :D

PS0: No, this isn’t fiction. You can ask Kshitij and confim. :P

PS1: External hd crashed. All the movies, music and TV series lost. :(

PS2: Above that, WD site sucks like hell.

PS3: And more above that, down with a cold. :(

PS4: Bad times!

11 responses so far

Wireless drivers

Jan 31 2009

Q: Why do some people get mad while installing wireless drivers?

Ans: Because they use Atheros chipsets and have to install madwifi.

Courtesy: The one who pwns Santa.

5 responses so far

My Googling Stats

Jan 26 2009

Tagged by Maruti.

My Google search stats

My Google search stats

Observations:

1) I search more during winters. Weird.

2) Daily search number is almost the same.

3) Average sleeping time 4-12.

PS: Cleaned my room the first time since I shifted in August. :D

PS2: Song of the day: Düm Tek Tek by Hadise

PS3: Felicity is coming. (increasing the page rank :D )

PS4: Will miss the Republic Day celebrations. :D

2 responses so far

Wiki blues

Jan 16 2009

Wikipedia went down!

Wikipedia went down!

3 responses so far

« Newer - Older »