Tag Archive: Technology


(Almost) Destroying Explorer.exe, AGAIN

Today, somehow or other, I stumbled upon the distributed processing app called GIGRIB. Developed by Pingdom, “Pingdom GIGRIB is a unique, distributed website monitoring service. GIGRIB users can add websites they want monitored, and in return their computers become a part of the GIGRIB monitoring network.”

So, I fired it up, inputed the domains I wanted it to monitor for me, and let it run. Of course, I became curious in how the app is uploading data back to Pingdom, how it’s checking uptimes (well, duh, it’s just going to the page and looking for a response), and more, so I opened my HTTP packet sniffer/web debugging proxy of choice: Fiddler. However, GIGRIB’s requests weren’t displaying there and I was too lazy to change the configuration to avoid this problem, so I decided to take revenge on GIGRIB. Naturally, when wanting to make a mild impact (meant for hilarity) on an application, the tool of choice is Resource Hacker (not that it only does mild impacts, it can do LOTS of stuff – I love ResHacker, it rocks!).

I hadn’t used ResHackONoez instead of starter in some time, so I didn’t bother trying to find it on my drive. Instead, I got the latest version, which turned out to have some cool new features – it visualizes the GUI of the app you’re editing and lets you change all aspects of the layout with ease, it provides a more streamlined “compile scripts” action to quickly apply changes to the file, and more! I was intrigued by these new additions, so I decided to try them out.

After changing some of the text, GUI positioning, icons, and more in GIGRIB, I got a little bored, because GIGRIB doesn’t have too big a UI (really, there’s only like two windows that have info in them – settings and about). For some reason, I had a sudden urge to mess around with some Windows configuration files. My (first) target of choice: the text of the Start button on the taskbar.

Yes, that may sound lame, but I guess I was just playing around with Start Menu customization before the hack, which is probably where the idea came from. I opened up %windir%\explorer.exe in ResHacker, and browsed to “String Tables –> 37 –> 538″ and changed the string from “start” first to “ocrap”, and then decided to switch it to a 6-letter phrase instead. After saving this final version (“ocrap” worked perfectly), I killed explorer.exe and tried to restart it thru Task Manager, when I get an error: “C:\Windows\explorer.exe in not a valid Win32 executable.” I tried re-saving, switching it back to “start” and saving again, but it did not help. Thankfully, I knew that ResHacker saves backups automatically, so I had a backup called C:\Windows\explorer_original.exe. I ran this one to fix the problem. In the C:\Windows directory, I tried again and again to undo the changes and restore to the backup, but Windows would keep resisting. After a few attempts, I thought that changing the files around in Safe Mode would do the trick, but as I was rebooting, I had a thought: Windows has many fail-safes, so why can’t this be one of them? If explorer.exe gets corrupted, would it be restored with a restart?

Well, it worked! This is why I love Windows – if something is messed up, there’s always a way to recover it, however simple or difficult.

Start menu button string location in %windir%\explorer.exe:

String Table –> 37 –> 1033 –> 578 = Windows XP default theme

or

String Table –> 38 –> 1033 –> 595 = Windows Classic theme

Note: I have nothing against GIGRIB or Pingdom, as I believe that both company and product are useful, intriguing, and helpful. I am an avid user of GIGRIB, and my experimentation with it was in no way a signal of protest against it, nor does it affect its functionality in any way. GIGRIB is a very generous program that I enjoy, so I must thank Pingdom for creating it.

Disclaimer: I am not in any way responsible for any uses (and their consequences) of the method outlined above. This is for informational use only.

The anti-trust community is all over Google, these days, says an article in the August 2009 issue of Wired Magazine. Fred Vogelstein tells readers that the search giant is the new Microsoft – remember that huge antitrust lawsuit against Microsoft for packaging their browser with Windows? Now they’re interested in the advertising and business ideas of Google, as Google has a huge market share in the advertising and search market, which gives them an enormous amount of data about users. After all, why do they give their excellent software away for free? This is because the more users that their applications have, the more data they have about them, about their interests, their personal identity, and much much more. Effectively, many companies have access to such huge amounts of personal info – take Facebook for example, which acquired FriendFeed yesterday. They can (and do, for all I know) use all the data that users submit about their interests, identity, preferences, and more, to target advertisements, to circumvent identities (in malicious situations), to sell the data to marketing agencies, and more. Or look at Twitter. Look at how much detail Twitter has, even though mostly all of it is accessible by anyone (except of course for preferences, Direct Messages, and protected updates). I rather like Twitter, but what if they (or someone else, possibly someone who scrapes personal info off of their site) use it to create a whole “profile” of a person’s characteristics, personality, hobbies, interests, and whatnot? I know that Twitter won’t do this, but some other company in such a situation might. Like Apple.

Apple is the one the antitrust community should be gunning for. Look at how they are monopolizing.A classic example is the iPhone, exclusive to AT&T. Why is this, you might ask? This way, they can pull even more money out of the pocket’s of their users. Also, what is the whole point of all the restrictions inside the iPhone OS? Why can’t Apple be open, like Google with Android, open-sourced and partially developed by the community from the start? The Macintosh, Apple’s key product, is also an example of this. Mac OS X is only compatible with Apple hardware, not anything else, so that everything has to be through Apple, hardware and software, meaning more money for Apple, as well as an unnecessary monopoly, while Windows is completely open to all suitable hardware, because Microsoft isn’t a hardware manufacturer and knows not to lock people in, though they did that with IE some time ago (and possibly even again now). Apple even makes it hard for you to change the battery in a laptop!!! They want you to stop from using devices from others that compete with them!

And yet we agree to such a tradeoff. We still give all our information to Apple, ranging from our music purchases in iTunes (musical preferences and interests), files in MobileMe, email, pictures, computer preferences, and so much more. But they are crossing the line – why don’t they understand that doing so is dangerous? However, no one seems to care that Apple is being so monopolizing to users, even though in some of its main conquests it has a small market share. Look, this will end bad for you, Apple, so make the situation better for users NOW and save yourselves of the future consequences of not doing so. Otherwise, what is the commercial world coming to?

In my last post, I explained what truly went on in the Twitpocalypse, which dealt with tweet IDs passing the limits of the 32-bit signed integer (from -2,147,483,647 to +2,147,483,647), which is the most common datatype in use in computer applications today. Yet, whilst computer science has limits embedded into its structure, Twitter does not – the number of users and tweets is growing, and FAST! In September, the Twitter API team estimates, we will pass the limits of the 32-bit unsigned integer which is up to 4,294,967,295. Thus, applications and libraries that utilise that datatype in conjunction with tweet identification numbers in the Twitter API will fail, once again. In the post where I explained the first Twitpocalypse, I recommended that all applications switch to the 64-bit signed (or unsigned even) datatype, and then maybe even consider storing the IDs as strings, with variable length (no arithmetic between IDs is really needed, so this should be extremely easy). The Twitter API team is doing the same thing – it has now informed developers that it is best to switch to a 64-bit implementation for storing those integers. Hopefully, this time, we will be prepared for the upcoming Twitpocalypse, and even less confusion and problems will arise when we pass that huge number of tweets. I myself am switching to a string implementation for the IDs in the Twitter client that I am developing (more info coming soon!), so that no matter how many tweets have been posted, the application will not fail. Good luck, everyone, in surviving this next round of this problem. [@twitterapi 's tweet; Twitter API Announcements (via TechCrunch)]

Numerous friends have asked me about this whole Twitpocalypse thing, as they just don’t get it. “What’s this whole deal with signed integers?”, they ask. Well I’m here to clear that up, as I do programming, and in programming, if you don’t know such basics of computer science, you’re doomed.

What the predicters of the Twitpocalypse were referring to when they mentioned the limit of 2,147,483,647, is the limits of the signed integer data type. The signed integer is a 32-bit data type, so it can hold only so large (or so small) a number – in this case, the highest number the data type can preserve in 32-bits is 2,147,483,647, and the lowest number is -2,147,483,647, respectively. This is what causes the Twitpocalypse problem, as well as the foreseen Unix Year2038 problem (where Unix epoch time will cross the limit, and distros using the 32-bit data type will fail.)

Each tweet in the Twitter infrastructure has its own numeric ID. Thus, programs that invoke the Twitter API’s ID interface into a 32-bit variable fail, as the number of tweets has passed the limit. When this happened, some applications failed, others continued working, depending on their implementation of this feature. Of course, updates were quickly rushed to the failing products, so that users wouldn’t be discouraged or affected for too long. Most applications now use the 64-bit integer datatype (commonly referred to as long or int64) for the ID variable, which supports numbers from −9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 – in other words, pretty large. Until then, we’re safe, but if we manage to cross that 9 quintillion mark (well, it’s certainly possible! :) ), we may be forced to convert to the 128-bit integer time, or even storing numbers as strings (the datatype for any types of characters, mostly letters), but I think computing will have changed a bunch by then, so that we might not even think of such a problem. That is, if Twitter lasts till then, or maybe the world will have been sucked into a black hole. We’ll see.

(On a side note, last year, I created a VeryLargeInt class for storing huge numbers (100 digits long can be stored with this, or even more!) by using the string data-type, and I also built algorithms for computation with strings, including most common mathematical operators. I may publish this project here in the future.)

Copyright © 2010 Maxim Zaslavsky. All Rights Reserved.

Videos, Slideshows and Podcasts by Cincopa Wordpress Plugin