Decoding YouTube HTTP Error 500 Message

Frederic Cambus October 26, 2010 [Miscellaneous]

I was quite delighted this morning when I discovered Youtube's custom HTTP 500 server error message for the first time:

**500 Internal Server Error**

Sorry, something went wrong.

A team of highly trained monkeys has been dispatched to deal with this situation.

If you see them, show them this information:

This message was followed by information encoded in modified base64 for URL applications (base64url encoding), which differs from original base64 by the fact that the padding character '=' is dismissed and the '+' and '/' characters gets respectively replaced by '-' and '_' characters. Assuming the given information data has been saved in a file called error.txt, it is easy to convert the base64url encoded data into original base64 using sed:

sed 's/\-/\+/g;s/\_/\//g' < error.txt > error-base64.txt

Then we can decode the base64 error message:

base64 -d error-base64.txt > result.txt

Now, what's contained in result.txt you may wonder? Sadly, it just looks like random data, and using the file command to try to determine the file type seems to confirm this statement:

file result.txt
result.txt: data

Sadly, contrary to my expectations, there doesn't seem to be any hidden message... Screw you, highly trained monkeys!