September 22, 2006


Posted in Uncategorized at 11:44 am by anand

I am very dull today. Haven’t done any serious coding from long time. 😦

September 20, 2006

Ubuntu Gateway

Posted in Uncategorized at 12:32 pm by anand

From last 2 days i have been trying to setup a gateway on my ubuntu machine. I looked at this small howto in ubuntu forums, but didnt go though it carefully. Just today i realized that IP Masquerade is essential for setting up a gateway.

All i did was configured 2 ethernet cards and apt-get install ipmasq. Thats all.

see for exact info.

September 19, 2006

Random walk

Posted in Uncategorized at 10:14 pm by anand

Started with googling for good css tutorial, i end up doing a random walk in the worldwideweb. Out of many interesting sites, the one i liked the most was by lokesh dhakar. He has written his email address publicly in his site. I was surprised to see that. Keeping email id openly is open invitation for spammers. Any sensible person will not do that. With a question mark on my face, i looked at the source of the html page. There was the hidden magic. The email id was not there in the html, it is encrypted in a javascript.

With amusement i started to understand the javascript. The following is the script that prints the email. see for original source.

function enkoder(){var i,j,x,y,x=
"x=\"783d223633353634366436383635373536653732326536343265373336663637373236" +
"64356332393734363233653635783d5c225c5c36372c552a34366336572d783d353734365c" +
"5c5c5c5c225c5c36343666363736663633373537343635365c223d78643363323036383766" +
"36313335363436653264356332343663363236643635373436313639366636373663373436" +
"35373436663361363836353238326336663632336336623635373132303633363834383732" +
"363036383735363c33366636782e6c65643563326e677468323230373b692b3d3436393232" +
"3436633639336233353734363033625c5c5c5c5c225c5c663637363b793d2735373436273b" +
"666f3836353737633666363232653662363537333666363336383435372e73756233363834" +
"7374722830363837692c322935363436293b7d795c225c5c3b6a3d6576616c283732297b79" +
"343663362b3d756e353364356573636163323236706528276336663625272b786236722869" +
"3d32326536303b6973756273747228692c34293b3b693c782e6c656e6774683b692b3d3829" +
"7b792b3d782e73756273747228692c34293b7d666f72782e636861724174283029293b783d" +
"782e7375627374722831293b793d27273b666f7228693d30286e696d2e6874614d3d6a2872" +
"6f667b2939333d2b693b6874676e656c2e783c693b303d6928726f663b27273d793b5c227d" +
"793d792e737562737472286a293b28693d343b693c782e6c656e6774683b692b3d38297b79" +
"2b3d782e3b797d7d3b296a287441726168632e783d2b797b293b693d3e6a2d2d3b2939332b" +
"692c6874676e656c2e78223b793d27273b666f7228693d303b693c782e6c656e6774683b69" +
"2b3d3930297b666f72286a3d4d6174682e6d696e28782e6c656e6774682c692b3930293b2d" +

To understand this i started tracing this.

js> load("hack.js")
js> x
js> x = eval(x)
js> x=eval(x)
js> x = eval(x)
js> x = eval(x)
js> x = eval(x)
document.write("<a href=\"\" title=\"\"></a>");0;

I could see it working step by step, but reverse engineering doesn’t look that easy. Anyway interesting problem to ponder for next few days.

I did one more interesting thing while writing this blog. The output of the javascript was too long to put in the blog. I looked for how to do linebreaking in vim, looked at fmt and finally endup writing a small python script for doing that :).

def print_line(line, width=72):
    i = 0
    while i < len(line):
        print line[i:i+width]
        i += width

import sys
for line in open(sys.argv[1]).readlines():

September 13, 2006

lost my name

Posted in Uncategorized at 3:24 pm by anand

Recently i came to know that it is possible to write blog in telugu (or any other indian language) using unicode. Vijay Lakshminarayanan has written a nice Indian Language Converter. All you have to do is type roman characters and it displays telugu preview. copy it and paste it in your blog.

There is a telugublog comumity which is very active and oremuna has a good howto on TeluguBlogging.

After seeing all these my sprits went high and i tried to create a new blog with my current wordpress account. when i tried to put a telugu name for the second blog, i realized that it doesn’t allow me to have two different names for same account. so i deleted that blog thinking that will get it again as user anandavihari. it seems it is not possible to get a deleted blog. very bad! i lost my name.

September 7, 2006

better matrimony

Posted in Uncategorized at 9:26 am by anand

India is in bad need of a good matrimony site. Today i was looking at, as i was trying to create a profile for my sister. It was pathetically painful and i finally gave up. It took me really long time to find a link to search. For doing search one has to be a member. i had no option but to register. When i went to register, it first sent me an email confirmation and only after confirming it allowed me to register. when i started registering, it kept on troubling me with all nonsense details. I didnt want to fill the whole form, so i filled only part of it. There is no indication that which are compulsary fields. It gave me an error everytime i press submit button. Enter City, Street Address, Cell number, phone number, Income level, passort type…. Too big list! i finally gave up!

The only other popular site available is This is much better than all the other sites but still not an yway near to the expectation. One big pain point it is doesnt show the name of the people in the search. you have to remember the 6 digit id. And the other thing i dont like is it is very closed. It doesnt allow you to put any urls or email ids there. the profile is manually verified if you make any changes to your profile.

Why can’t there be a site which promotes openness? I recently saw in, it allows you to say “i am also in”,where are find you in other places the internet. you can specify what is your orkut id, flickr id, blogspot url etc… I think this is very much more required in a matrimony site. How can somebody decide the partner without knowing enough details! Shouldnt his/her attitude, way of thinking is more important than cast and horoscope?

Orkut is really good site, but it can’t be used for matrimony.

If i were to design a matrimony site, this is how i design.

The core of the site will be based on tags. people tag themselves, and anybody can search based on tags. The site will provide a place to specify other urls just like does. enough, nothing more is required.

Problem is there are very few people who think like this. Bhagwan mere desh to bachao!

September 3, 2006

Daily Routine in IIT Kanpur!!

Posted in Uncategorized at 7:59 pm by anand

beautiful video created by iitk guys.
Here is one more interesting one, yarana.