Sunday, March 22, 2009

Home

After ten years of searching, I've finally found a place where I fit :)

Monday, March 16, 2009

Haunted

I heard your voice through a photograph
I thought it up and brought up the past
Once you know you can never go back
I've got to take it on the otherside

Centuries are what it meant to me
A cemetery where I marry the sea
Stranger things that changeed my mind
I've got to take it on the otherside

Scarlet starlet and she's in my bed
A candidate for a soulmate bled
I push the trigger and I pull the thread
I've got to take it on the otherside

(parts of Otherside by RHCP)

Monday, March 9, 2009

Untitled


They say that one picture is worth a thousand words...

Sunday, March 8, 2009

Daemon

Well, as you might (or might not) have gathered from my previous post, I've recently had the good fortune of reading "Daemon" by Daniel Suarez. Those interested in finding out more about the book can either visit its official site, or they can go to the trouble of googling for it. The book has got some awesome reviews, and it's the best geek-book I've read (although I understand that it's very easy and interesting for non-geeks as well) since Snow Crash by Neal Stephenson, but that's what this post is about.

Apparently, the last page of the book mentions something about something, and points the reader to the About the author page for further details. On visiting the said page, one will see a rather strange picture of the author. One that fans of ASCII art might find familiar. However, what is different about this particular sample of coloured ASCII art, is that the text itself hides a message in encrypted form.

Now, it seems that not many readers are aware of this, because on googling for it, I only found one relevant link: the one at Ethical Hacker. The people there have given a long and rather complicated guide to decoding the code by writing a program in C#. After which they've given rather vague and cryptic hints about writing a script to scrape the webpage periodically, as the author suggests. After several attempts (and several failed executions), I was about to hurl my keyboard across the room in frustration when I saw the "Forums" link at the top of the page.

There I saw that one of the users had had success in decrypting the code in merely 10 lines of Python code (excluding "include" statements). However, his code was rather incomplete (at best), so I set about writing my own.

And so, after two hours, I've written a script that checks the page, gets the RegexDate from there, compares it with a date stored in a local config file, and if the two are different then it proceeds to decrypt the web page and creates a text file containing the decrypted message on the user's desktop. And to top it off, it also uses gnome's libnotify to pop off a permanent notification announcing that the page has been updated.

To run this script, one will need to install pyDes, a python library that allows the user to decrypt base64 DES encoded strings. This library can be found here. It's a small download, just follow the instructions given on the page to install it on your system.

Windows users will need to modify my script to save the location of the config file. I believe changing sys.path.expanduser('~') to sys.environ('home') should do the trick. And you will also need to comment out the lines in which I call upon the notification system to display a notification. If you want something similar, try calling up dialog boxes from win32.

Oh, and the Ethical Hacker people have tried to ensure that only readers of the book will be able to decrypt the message by putting the encryption key as "Gragg's key" in their code. I have no such qualms, and hence have put the actual key in my code. The reason behind doing this is that only readers of the book would actually be interested in my script, so there seems to be little reason to stop them, or to force them to rack their brains trying to solve the "little riddle".

Tuesday, March 3, 2009

Irony


I find it mildly amusing that Daniel Suarez, the author of Daemon, the novel that's captured the imagination of every geek worldwide, can't make his home page in such a way that one part of it doesn't overlap with another.