Decoding Experts-Exchange.com

Phatbot  (chunkylover37@gmail.com)

At work this week, I was trying to resolve a particularly pernicious bug, so I Googled for the error message and came up with this: www.experts-exchange.com/Programming/Misc/Q_20914397.html

Experts-Exchange.com - Hmm..., that's awfully close to ExpertSexChange.com, another of my favorite websites!  Er, not really.

Like many such sites, they would like your money before showing you the solutions to the questions posted.  But unlike other sites, Experts Exchange actually does show you the solutions, just in a grayed-out box that's hard to read.

When I've come across this site in the past, I just viewed the HTML source, and there you could read the answers in plain text, thus saving you their $20 yearly fee.  But this time, the answers looked like this:

Vg'f abg nf hahfhny nf lbh znxr vg fbhaq...

(It's not as unusual as you make it sound...)

Not terribly helpful, but I guessed that they were using a simple substitution algorithm to encrypt the text.

I quickly fired up a text editor, copied the encrypted text to a file called experts-exchange.txt, and wrote this Perl script:

#!/usr/bin/perl
open(IN, 'experts-exchange.txt');
  my $text = join('', <IN>);
close IN;

$text =~ tr{VvGgFf}{IiTtSs};

print $text;

I'm using the tr (transliteration) operator to change each V in the text into an I, and so on.  I just guessed that the string Vg'f was supposed to be the word It's.

The result looked promising, so I just kept making guesses.  Ultimately my decoding looked something like this:

$text =~ tr{AaBbCcEeFfGgHhIiJjLlMmNnOoPpQqRrSsTtUuVvWwYyZz}{NnOoPpRrSsTtUuVvWwYyZzAaBbCcDdEeFfGgHhIiJjLlMm};

With everything in alphabetical order like that, it's pretty easy to see that the text was just ROT-13-encoded.

So, this simplified Perl script took care of decoding the whole thing:

#!/usr/bin/perl
open(IN, 'experts-exchange.txt');
  my $text = join('', <IN>);
close IN;

$text =~ tr{A-Z}{N-ZA-M};
$text =~ tr{a-z}{n-za-m};

print $text;

Now, in my case, the decoded text didn't get me any further toward solving my original problem than the encoded text, but it was a fun diversion.  Your mileage may vary.

Editorial Note:  As of press time, we have been notified that Experts Exchange has recently changed its website so that the ROT-13 decoding algorithm described here will no longer work.  We hope that our readers will nonetheless find the article instructive.

Return to $2600 Index