February 13, 2009
1234567890 .....
Today unix epoch time is going to cross 1234567890 !!. Track it in http://www.coolepochcountdown.com/
April 24, 2008
Facebook Chat
Today Facebook released chat that looks similar to Gmail. I have written an article about how chat works in Gmail. Facebook chat is also based on HTTP but they are not using any hacks like Gmail chat. Here is how it works.
Check it out my previous article on why chat in HTTP is challenging. Facebook's approach for this straight forward. They always opens one connection to Facebook server and when ever you receive a chat message from your friend they show it in chat window or in case of timeout they open one more connection immediately and waits for response.
Client A -----> Server -----> Client B
Fig 1.
For example, suppose A sends a message to B. Since A can't direct sent the message to B it has to post that message to Facebook Server and which inturn should send the same to B. Here Both clients A and B opens a connection (This is an Ajax request) to Server and waits for Server response. Server will respond only if it has any outstanding message pending to that client. (In our example message from A to B). Since there is already a connection B opens to server it will immediately get the message A had sent. For instance if there is no message, the opened connection will be timed out (this is 300sec for Firefox. You can change the default value by changing network.http.keep-alive.timeout ) and Facebook again opens a new connection (Ajax request) and above process repeats.
The URL that Facebook opens to Server will looks in follaowing format.
http://0.channel10.facebook.com/x/ /true/p_ =803&
Check it out my previous article. How Gmail Works !.
Check it out my previous article on why chat in HTTP is challenging. Facebook's approach for this straight forward. They always opens one connection to Facebook server and when ever you receive a chat message from your friend they show it in chat window or in case of timeout they open one more connection immediately and waits for response.
Client A -----> Server -----> Client B
Fig 1.
For example, suppose A sends a message to B. Since A can't direct sent the message to B it has to post that message to Facebook Server and which inturn should send the same to B. Here Both clients A and B opens a connection (This is an Ajax request) to Server and waits for Server response. Server will respond only if it has any outstanding message pending to that client. (In our example message from A to B). Since there is already a connection B opens to server it will immediately get the message A had sent. For instance if there is no message, the opened connection will be timed out (this is 300sec for Firefox. You can change the default value by changing network.http.keep-alive.timeout ) and Facebook again opens a new connection (Ajax request) and above process repeats.
The URL that Facebook opens to Server will looks in follaowing format.
http://0.channel10.facebook.com/x/
Check it out my previous article. How Gmail Works !.
April 21, 2008
World's Most Innovative Companies
BusinessWeek released World's Most Innovative Companies list and interestingly two Indian companies Tata and Reliance Industries are there. Tata is in 6th position and Reliance Industries is in 19th position.
April 20, 2008
How Gmail Works !
This article is not about how Gmail works exactly but i find some features of Gmail interesting and i tried to understand how they work.
In HTTP, client initiates connection to the server and server sends the data client had requested. Its pull mechanism i.e client always initiates the connection and server responds with appropriate data. In case of chatting the communication is bidirectional. For example, lets assume Client A and Client B are chatting in Gmail. If Client A sends a message to Client B, Since Client A can't connect to Client B directly (because both are HTTP clients) it goes via intermediate Google servers. So the flow is,
Client A -----> Server -----> Client B
Fig 1.
To happen above communication, Server have to initiate connection to B. Here is where the problem lies. How can server initiate a connection to client ?.
HTTP 1.1 introduced chunked tranfer encoding. This is usually used to transfer a file of unknown length or more specifically stream data to client from server (Remember this is after the client initiates the connection). Gmail chat nicely exploits this feature. What they do is, they put a hidden iframe (Ex. Client B) and sets its source URL to Google server. Whenever data is available at the server end (In our example Client A had sent the data to server which it is supposed to transfer to B) it sends the data to client (Client B) . Since this connection will never end the server can send the updates (Whenever it receives a message from Client A ) to client (Client B).
Following is the HTTP Request and Response captured using Wireshark that is part of the chat conversation.
HTTP Request
GET /mail/channel/bind?at=xn3j322i8pev1stfx4irewnfnlbt1l&VER=6&it=141&RID=rpc&SID=14AEDGD25D064E14&CI=0&AID=60&TYPE=xmlhttp&zx=en6uu1u8grtt&t=1 HTTP/1.1
Host: mail.google.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: close
Referer: http://mail.google.com/mail/?ui=2&view=js&name=js&ids=vsemtnrembkr
Cookie:
HTTP Response
HTTP/1.1 200 OK
Cache-control: no-cache
Pragma: no-cache
Content-Type: text/plain; charset=utf-8
ETag:
Transfer-Encoding: chunked
Server: GFE/1.3
Date: Thu, 03 Apr 2008 03:39:58 GMT
Connection: Close
15
18
[[61,["noop"]
]
]
There are several server push technologies available. Detail explanation about this can be found in the following articles.
http://cometdaily.com/2007/12/11/the-future-of-comet-part-1-comet-today/
http://cometdaily.com/2008/02/22/comet-and-http-pipelining/
http://cometdaily.com/2007/12/18/latency-long-polling-vs-forever-frame/
http://en.wikipedia.org/wiki/Chunked_transfer_encoding
http://en.wikipedia.org/wiki/HTTP
File upload.
They use again hidden iframe hack. Check this blog for more information.
Apart from Gmail implementation. If you want to group the mail archive thread wise i.e like Gmail style conversation you can refer the Threading algorithm which was used in Netscape mail.
Gmail Chat.
Gmail nicely integrated the chat functionality in browser itself. Technically its challenging to implement it. At a first glance we will not understand why it is ?. Lets see why this is tricky.In HTTP, client initiates connection to the server and server sends the data client had requested. Its pull mechanism i.e client always initiates the connection and server responds with appropriate data. In case of chatting the communication is bidirectional. For example, lets assume Client A and Client B are chatting in Gmail. If Client A sends a message to Client B, Since Client A can't connect to Client B directly (because both are HTTP clients) it goes via intermediate Google servers. So the flow is,
Client A -----> Server -----> Client B
Fig 1.
To happen above communication, Server have to initiate connection to B. Here is where the problem lies. How can server initiate a connection to client ?.
HTTP 1.1 introduced chunked tranfer encoding. This is usually used to transfer a file of unknown length or more specifically stream data to client from server (Remember this is after the client initiates the connection). Gmail chat nicely exploits this feature. What they do is, they put a hidden iframe (Ex. Client B) and sets its source URL to Google server. Whenever data is available at the server end (In our example Client A had sent the data to server which it is supposed to transfer to B) it sends the data to client (Client B) . Since this connection will never end the server can send the updates (Whenever it receives a message from Client A ) to client (Client B).
Following is the HTTP Request and Response captured using Wireshark that is part of the chat conversation.
HTTP Request
GET /mail/channel/bind?at=xn3j322i8pev1stfx4irewnfnlbt1l&VER=6&it=141&RID=rpc&SID=14AEDGD25D064E14&CI=0&AID=60&TYPE=xmlhttp&zx=en6uu1u8grtt&t=1 HTTP/1.1
Host: mail.google.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: close
Referer: http://mail.google.com/mail/?ui=2&view=js&name=js&ids=vsemtnrembkr
Cookie:
HTTP Response
HTTP/1.1 200 OK
Cache-control: no-cache
Pragma: no-cache
Content-Type: text/plain; charset=utf-8
ETag:
Transfer-Encoding: chunked
Server: GFE/1.3
Date: Thu, 03 Apr 2008 03:39:58 GMT
Connection: Close
15
18
[[61,["noop"]
]
]
There are several server push technologies available. Detail explanation about this can be found in the following articles.
http://cometdaily.com/2007/12/11/the-future-of-comet-part-1-comet-today/
http://cometdaily.com/2008/02/22/comet-and-http-pipelining/
http://cometdaily.com/2007/12/18/latency-long-polling-vs-forever-frame/
http://en.wikipedia.org/wiki/Chunked_transfer_encoding
http://en.wikipedia.org/wiki/HTTP
File upload.
They use again hidden iframe hack. Check this blog for more information.Mail Threading.
I initially thought it is a bit complex algorithm. Why i thought was, when some one sends reply from different email server like yahoo how they say it is reply to my previous mail. Although it seems obvious if we see the SMTP headers you will not find any reference to previous mail. But it turns out to be very dumb algorithm. I mean it is mostly based on the subject of the mail. If you send a mail to A and if he replied with different subject Gmail will not show it as a part of the same conversation. If A sends a completely different mail (not to reply to your mail) and if he uses a subject that is similar to one you send to him earlier, gmail shows it as a part of the previous mail conversion.Apart from Gmail implementation. If you want to group the mail archive thread wise i.e like Gmail style conversation you can refer the Threading algorithm which was used in Netscape mail.
March 4, 2008
The smartest unknown Indian Entrepreneur !
It is great to known about this company. You can find more about it in original forbes article. Their product zoho.com is really wonderful. Found this article from Indian Economy Blog. The point i wanted to highlight from the article.
Vembu has done something few Indian entrepreneurs have been able to achieve--build a true "product" company out of India.
Vembu has done something few Indian entrepreneurs have been able to achieve--build a true "product" company out of India.
February 22, 2008
Making Phun Work
Phun is an amazing application. It is created by Emil Ernerfeldt.
Phun is meant to be a playground where people can be creative. It can also be used as an educational tool to learn about physics concepts such as restitution and friction.
You can find more about this app from the following Youtube video. When i tried the app it was not worked for me. It throwed following Error.
Caught exception: Couldn't set video mode, SDL-error: Couldn't find matching GLX visual, /home/c03/c03eet/Phun/Source/core/Main.cpp:228: int main(int, char**)
ERROR: Exception caught in main: Couldn't set video mode, SDL-error: Couldn't find matching GLX visual
ERROR: Exception caught: Couldn't set video mode, SDL-error: Couldn't find matching GLX visual
I am using Ubuntu 7.10 and i have inbuilt graphics card that comes along with my laptop. After couple of hours i made it work and here are the things you have to do.
1. By default the color depth is 16 bit. Change this to 24 bit. Open /etc/X11/xorg.conf search for DefaultDepth and set the value to 24.
2. Open autoexec.cfg file in the Phun directory. uncomment the last line i.e Resources.shaders = false;
3. Go to the Phun directory (If you extract the files by default all files will be extracted here) and run phun. (You should do this by going inside the directory.)
You can download Phun from http://www.acc.umu.se/~emilk/downloads.html
Phun is meant to be a playground where people can be creative. It can also be used as an educational tool to learn about physics concepts such as restitution and friction.
You can find more about this app from the following Youtube video. When i tried the app it was not worked for me. It throwed following Error.
Caught exception: Couldn't set video mode, SDL-error: Couldn't find matching GLX visual, /home/c03/c03eet/Phun/Source/core/Main.cpp:228: int main(int, char**)
ERROR: Exception caught in main: Couldn't set video mode, SDL-error: Couldn't find matching GLX visual
ERROR: Exception caught: Couldn't set video mode, SDL-error: Couldn't find matching GLX visual
I am using Ubuntu 7.10 and i have inbuilt graphics card that comes along with my laptop. After couple of hours i made it work and here are the things you have to do.
1. By default the color depth is 16 bit. Change this to 24 bit. Open /etc/X11/xorg.conf search for DefaultDepth and set the value to 24.
2. Open autoexec.cfg file in the Phun directory. uncomment the last line i.e Resources.shaders = false;
3. Go to the Phun directory (If you extract the files by default all files will be extracted here) and run phun. (You should do this by going inside the directory.)
You can download Phun from http://www.acc.umu.se/~emilk/downloads.html
December 15, 2007
Google Reader Friend's Shared Items.
Now Google reduced the effort of mailing shared items link !. It would be nice if it gets the friends from Orkut as well.
http://googlereader.blogspot.com/2007/12/reader-and-talk-are-friends.html
http://googlereader.blogspot.com/2007/12/reader-and-talk-are-friends.html
December 14, 2007
Google Knol
It is quite a surprise news from google. There are lot of articles discussing about the same. I find the following two articles interesting.
http://www.bubblegeneration.com/2007/12/how-not-tospecial-knolgoogle-edition.cfm
http://www.krishworld.com/blog/open-source/open-media/wikipedia-is-safe-from-google-knol/
The advantages of Knol over Wikipedia are, it clearly defines the owner of an article and it provides a proper monetization platform. The former clearly differentiates between these two approaches. The later problem can be fixed and it should be as the current way of monetization for Wikipedia can't sustain.
It is an interesting move from Google. If you miss the recent blog post about assessment of Google-Yahoo results, you can read it here. Another goal of the project might be to collect more interests of user. I mean, as rating system is present in Knol, Google can precisely know which articles, style of writing etc hence they can better serve the ads for users as well. Google may further extend it and provides social networking functionality.
Yahoo tried to gather collective wisdom of crowd through Yahoo Answers and it replaced discussion forums, newsgroups etc and now Google have even bigger plans and trying to replace Wikipedia !!.
November 27, 2007
CNaming my Blog !
I changed my blog name from http://sairahulreddy.blogspot.com to http://blog.sairahul.com. It is very simple to do. You can find the instructions for doing it here.
step 1. Create a DNS entry for blog.sairahul.com as follows.
blog IN CNAME ghs.google.com.
step2. Go to your blog setting in blogger and then go to Settings->Publishing->Advanced Settings and enter your blog name here.
Now if you go to your new address, you can observe that all your blog entries point to the new address instead of old one. If you go to old address it will get redirect to new one.
How it works ?.
When you enter http://blog.sairahul.com in browser. The following sequence of steps will happens.
1. Browser tries to resolve the domain name of blog.sairahul.com. Since we have given blog.sairahul.com as CNAME of ghs.google.com, it will get IP address of ghs.google.com.
2. Next, browser will contact ghs.google.com (i mean IP address of ghs.google.com) and set Host field to "blog.sairahul.com"
3. Since Google knows (In step2 we added this) the alias of your blog name it will return your blog correctly.
Host name in step 2 is very important. Google differentiates domains using Host name (in other words it maintains multiple domains using same host name). You can test the above theory using nslookup and wget.
1. Get the IP using nslookup.
nslookup ghs.google.com
2. Get the page using wget.
wget --header "Host: blog.sairahul.com" http://
If you remove the header option in the above step it will return 404 or if you give different valid host name it will return that page !.
November 21, 2007
Firefox 3 Features in Pictures
You can download the beta version of Firefox here. You can find list of all changes in http://www.mozilla.com/en-US/firefox/3.0b1/releasenotes/#whatsnew. Here i am showing some of the important features i find interesting.
Zooming in Firefox is greatly improved. (All because of new rendering engine). Compare the yahoo home page in Firefox 2 and in Firefox 3 when the page zoomed out.
Zooming in Firefox is greatly improved. (All because of new rendering engine). Compare the yahoo home page in Firefox 2 and in Firefox 3 when the page zoomed out.
Download manager is integrated. You can now resume the download even after restarting Firefox.

Another great improvement is in typing the URL s. Now you can just type partial keyword even the title of the page. You can find similar incremental search feature in downloads as well (refer above image)

Bookmarking now supports Google like star. You can even add tags to the bookmarks. Now the bookmarks will be well integrate with online services like del.icio.us.

You can find the summary of the bookmarks in Places.

Add-ons now shows installed plugins as well. No need of about:plugins.

You can customize the default behavior of the mime type handling.

I used to kill Firefox to save the session :) (I know there are extensions now also. I don't want to install any). Now my little hack is gone !.

Last but not least you can find this cute warning when you go to about:config

Overall new Firefox features are great.
October 28, 2007
Yahoo Maps - Driving Directions
Yahoo released driving directions in India. It is really cool. Try
The really cool thing is directions in the right hand side. It shows small small details like Take Slight 1st Left, go 9.7 km. Although there are some problems (for instance if i tried Chandragiri to Thondavada it showed route from Chandragiri to Dantewada, Chhattisgarh though Thondavada is a nearby village to Chandragiri.) overall it is very good.
found @ gopal
May 19, 2007
About Google's New Interface
Google's new interface is better than earlier versions. Especially the top bar. It would have been nice if Google would have made the following changes to its interface.
The new interface makes the themed personalized home pages (aka iGoogle) looks very ugly. It looks horrible for certain themes. Instead of the white color for all themes they can blend the color with the theme.
April 7, 2007
Update on Google Notebook's Infamous Delete Problem !
Surprisingly Google rectified one of the problems i mentioned in my earlier post in just 2 days. The layout looks good in Firefox under Linux. The other problem, deleting the text when we past text from the Kate editor still remains. Here the problem is not with the Google notebook, in fact the problem is with Kate editor only. What happens when we copy some of the text from the Kate is, it adds meta tag before the text as show below. (Please note here that, although we copy text only, Kate tries to preserve the formatting by putting the text within pre tag. Although it is a text, it is not actually plain text, its html code. This is the way formatting will be preserved across applications when copy paste it)
( I generated the above html code by copy pasting some text from Kate to Thunderbird compose window and i saved it as html)After observing the above, i viewed the source code using the Firebug after pasting some text from Kate editor. (We have to see the source code before clicking on any other note. If we click on other note the copied text will get deleted) The source code looks as shown below.

Now i got little bit idea about what might happening inside. When we create a new note in Notebook, it creates an iframe and puts whatever text we put in body of the document. When we copy some text from the Kate, as i said earlier, it is putting some meta tag before the text. Because meta can't come under body, the newly added html piece of code is wrong. After pasting the code, Google Notebook validating the copied text and deleting it as it is not valid html. That's why, after pasting the text from Kate, the box becomes empty and Google Notebook always deletes the empty notes when we click on the other note. So it ultimately getting deleting. To cross check it, i deleted the meta notes from Firebug and it works beautifully after that. Because of the same reason, i guess, i can't able to paste the copied text from Kate to Microsoft's Wordpad editor (The default editor that comes with Windows !) . But i can copy it to Notepad, because it ignores the html tags. So Google Notebook have to remove the unnecessary meta information. Anyway copying meta information makes no sense. Thanks to Firebug for helping in figuring out this problem !

Now i got little bit idea about what might happening inside. When we create a new note in Notebook, it creates an iframe and puts whatever text we put in body of the document. When we copy some text from the Kate, as i said earlier, it is putting some meta tag before the text. Because meta can't come under body, the newly added html piece of code is wrong. After pasting the code, Google Notebook validating the copied text and deleting it as it is not valid html. That's why, after pasting the text from Kate, the box becomes empty and Google Notebook always deletes the empty notes when we click on the other note. So it ultimately getting deleting. To cross check it, i deleted the meta notes from Firebug and it works beautifully after that. Because of the same reason, i guess, i can't able to paste the copied text from Kate to Microsoft's Wordpad editor (The default editor that comes with Windows !) . But i can copy it to Notepad, because it ignores the html tags. So Google Notebook have to remove the unnecessary meta information. Anyway copying meta information makes no sense. Thanks to Firebug for helping in figuring out this problem !
March 30, 2007
Google Notebook is out Of Beta ... Not yet ready ???
Today Google Notebook is out of Beta. It seems that has still some bugs. I Found couple of glitches. For instance the rendering is completely bad in Firefox in linux. See the attached image. The other problem is, it is magically deleting the items. I added new note and pasted plain text into the box. When i click on the other notebook and when i click again on the same note it is deleting the text. The interesting thing is, i observed the above in linux (FC4 with Firefox 2.0.0.3) but i did not observe the same in Windows under the same Firefox version.
About Indian Cricket Team Peformance in Worldcup
Dravid going out in Burkha, the main reason for India's failure is India Gandhi and mail forwards such as "What India Will Do After World Cup (http://www.xboard.us/bbb/showthread.php?t=132096), Jokes such as this are good to laugh but really think about the Indian Team Performance. People can argue that whats the big deal to us (i mean as an individual) if they are out of the tournament. You may think its advertisers who are loosing money not us, but finally we are one who are paying the money to those companies. Means, we are loosing money. The same is true in case of TV Channels as well (Sony). Last but not least is, Country pride. Think about a country who has 2% of our population and still plays in the World cup. Its shame to our entire nation. Again the same question, 100 crore population and we did not find damn 11 players ?. Compare the same with the Australias team. The total population of Australia is 2 crore and they have such a nice players. What is the reason for this ?. India do not have right talent ? or BCCI is not taking right people ?.
Burning effigies, going into streats and throwing stones and things like these won't work. These are not the right way to express the discontent. Doing so will not create any impact on BCCI because it is getting the profits irrespective of our Teams performance. Who will work if they get the Damn money without doing any work. The right way to create impact is, stop watching all the matches India plays both in TVs as well as going to stadiums. I am not saying not to watch Cricket but don't watch matches which India plays. What's the advantage with this ?. The viewing rate will go down. (More on measuring the TV ratings can be found at http://en.wikipedia.org/wiki/Nielsen_Ratings) and if you do not go to stadiums then their income will come down. Doing this for a period of time will definitely create a impact. Infact it will create a BIG IMPACT.
The interesting thing is, no body (I mean BCCI or Chappel or Captain) is talking about the Indian team performance. Infact they are creating cock and bull stories to divert the problem. For instance recent allegation about leaking the Chappel SMS about the Indian team selection.
Sachin and Dravid are crying, Zaheer Khan broken a stool, Sreesanth couldn't control his emotions .... all these will console any body (http://www.dnaindia.com/report.asp?newsid=1087316) Who wants the emotions of 15 players, Who considers the emotions of 100 Crore people ??? Lets show our emotions in right way otherwise it's not going to useful anyone.
Dravid going out in Burkha, the main reason for India's failure is India Gandhi and mail forwards such as "What India Will Do After World Cup (http://www.xboard.us/bbb/showthread.php?t=132096), Jokes such as this are good to laugh but really think about the Indian Team Performance. People can argue that whats the big deal to us (i mean as an individual) if they are out of the tournament. You may think its advertisers who are loosing money not us, but finally we are one who are paying the money to those companies. Means, we are loosing money. The same is true in case of TV Channels as well (Sony). Last but not least is, Country pride. Think about a country who has 2% of our population and still plays in the World cup. Its shame to our entire nation. Again the same question, 100 crore population and we did not find damn 11 players ?. Compare the same with the Australias team. The total population of Australia is 2 crore and they have such a nice players. What is the reason for this ?. India do not have right talent ? or BCCI is not taking right people ?.
Burning effigies, going into streats and throwing stones and things like these won't work. These are not the right way to express the discontent. Doing so will not create any impact on BCCI because it is getting the profits irrespective of our Teams performance. Who will work if they get the Damn money without doing any work. The right way to create impact is, stop watching all the matches India plays both in TVs as well as going to stadiums. I am not saying not to watch Cricket but don't watch matches which India plays. What's the advantage with this ?. The viewing rate will go down. (More on measuring the TV ratings can be found at http://en.wikipedia.org/wiki/Nielsen_Ratings) and if you do not go to stadiums then their income will come down. Doing this for a period of time will definitely create a impact. Infact it will create a BIG IMPACT.
The interesting thing is, no body (I mean BCCI or Chappel or Captain) is talking about the Indian team performance. Infact they are creating cock and bull stories to divert the problem. For instance recent allegation about leaking the Chappel SMS about the Indian team selection.
Sachin and Dravid are crying, Zaheer Khan broken a stool, Sreesanth couldn't control his emotions .... all these will console any body (http://www.dnaindia.com/report.asp?newsid=1087316) Who wants the emotions of 15 players, Who considers the emotions of 100 Crore people ??? Lets show our emotions in right way otherwise it's not going to useful anyone.
May 16, 2006
Google Notebook is Out
Today google released Google Notebook. I liked this service much. Usually i save some important information as drafts in my email. Now i can use this online notebook service. Cool thing about google notebook is, select what ever you want in your browser right click and you can save directly. For this you have to download a plugin for your browser. For firefox you can download the plugin here. For internet explorer you can download it here.
Alternatively the same time of service is there from yahoo long back. But i find google notebook more useful because of its simplicity. More over in yahoo notepad you can not save html pages and images.
Sony today released a beautiful pocket size personal computer called VAIO. You can find photos of it here.

Alternatively the same time of service is there from yahoo long back. But i find google notebook more useful because of its simplicity. More over in yahoo notepad you can not save html pages and images.
Sony today released a beautiful pocket size personal computer called VAIO. You can find photos of it here.

April 25, 2006
Cool Links
Sexiest Cars 2006.
McNeal Step down as SUN Microsystems CEO.
Top 10 Windows XP Tips of All Time.
Interview with Marc Allen. (multimillionaire who publishes books like 'Creative Visualization' etc)
Indians are Richer !!!
Sumanth on New film Godavari.
Sexiest Cars 2006.
McNeal Step down as SUN Microsystems CEO.
Top 10 Windows XP Tips of All Time.
Interview with Marc Allen. (multimillionaire who publishes books like 'Creative Visualization' etc)
Indians are Richer !!!
Sumanth on New film Godavari.
April 20, 2006
How to hack Xonix game
Xonix32 is an adaptation of the classic X-Windows game "Xonix" for the Win32 platform. You can download the game from http://dl.winsite.com/files/986/ar2/winnt/games/xonix060.zip. It is very interesting game. If you haven't tried till now just try it.
If you observe the directory which it is installed, you will find a file hiscores.dat. In this file it is storing all the high scores. Let start our game. Get any good hex editor. I used Hex workshop. Open the hiscores.dat file in hex editor. If you haven't played the game then by default the file looks as shown in below figure.
If you haven't worked with any hex editor before then continue this para otherwise you can skip it. Left hand portion (selected as red) shows the byte numbers. Middle part shows (selected as blue) the actual data in the file and right hand side shows the ascii value of that data in the file. If the software is storing directly your name and score in the file then you can observe that in the right hand side.We can't gues any thing from this file. First play the game and make some score. Save the previous file before playing. I played the game and i scored 900 and i entered my name as "AAAAA". Open the file now and the file will look like this. Since it is not directly storing we can't find AAAAA in the right hand side portion. So it is doing some sort of encryption before storing the scores.
If you observe three or four such files, you can find that, it is storing the score in the first 40 bytes. Xonix stores only 10 maximum score entries so each entry shoule be 4 bytes long. Now change the first two bytes to "0000". This we are doing to find out the XOR value. (usually they will XOR before storing data. To find the XOR value we are putting 0000). Save the file and open the Xonix and see the high scores. It will show your score as 21845 instead of 900 !. Means it is XORing 900 with 21845 and storing the result. We finally found the XOR value.Now we will check whether what we found is correct or not. Let say we want to make our score 10000. The hexa decimal of 10000 is 2710. XOR this with 5555 (hexa decimal of 21845 is 5555) and you will get 7245. Since our machines are based on x86 architecture, it will store first low order byte and then it will store the high order byte. (This is called little endian format). So replace first byte with 4572. Now the file will look like this.
Make sure that you first close the Xonix before modifying the file. Otherwise those values will not get updated. Now save the file and open the Xonix. Now it will store your score as 10000!!!. Finally we have done. Similarly with some experimentation you can find out that it is storing the names also in the following portion of the file and each entry is 18 bytes long. Repeat the above procedure for names also.
All these i have done just for fun. Any way Xonix is open source program and you can find out this by seeing the source code. Thanks to Abhijit. With his suggestion only i cracked it.
Subscribe to:
Posts (Atom)


