Archive for August, 2009

Homeopathy

This post might be offending to homeopathy aficionados. I don’t care.

Got this mail in the evening:

Dear All,

The Campus Life council has arranged for the availability of the Homeopathic Medicine which helps to develop immunity against all kinds of Flu including the Swine Flu. For this purpose, we have appointed representatives in the Hostels who will be distributing the medicine.

Does homeopathy work? Various articles I found over the net claim it doesn’t. Wikipedia article says: Homeopathy is unsupported by modern scientific research. The extreme dilutions used in homeopathic preparations usually leave none of the original material in the final product.

Homeopathy medicines are based upon the “water memory” effect. The idea is as plainly epic as it sounds. The idea is, the more you “dilute” the drug, the more “potent” it becomes because the water actually “remembers” the drug.

Physicist Robert L. Park, former executive director of the American Physical Society, has noted that (from Wikipedia).

Since the least amount of a substance in a solution is one molecule, a 30C solution would have to have at least one molecule of the original substance dissolved in a minimum of 1,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 molecules of water. This would require a container more than 30,000,000,000 times the size of the Earth.

No, I don’t believe in homeopathy. And for something like swine flu, I suggest you too don’t.

PS0: Happy Independence Day to you all!

Comments (9)

Robot form submission – Part 2

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.

Comments (15)