163 Obfuscated Email

Description

If you want to ignore the introduction and just get to the task, skip down to the last paragraph.

Ah, yes… I remember the good ol’ days of Usenet, when the signal to noise ratio was high, very high… certainly much higher than the 1-to-100 ratio that is the curse of many newsgroups today.

Back then we had rules! And etiquette! And people felt compelled to adhere to such rules, because… well, that was how things were done. For the most part, we didn’t have to deal with the unrestrained spam that now pervades the Internet net like the lingering smell of boiled cabbage.

Where was I? ….. Oh yes, signatures! We had signatures for our posts and email, restricted to a narrow space of no more than four lines and no wider than the terminal. We’d put our names, email, phone… even funny quotes (or angry, political quotes for those angry, political folks). But it always fit within four terminal lines: never more.

But nowadays… What sane person would put his email address in his signature file, out in plain view for spammers to see? It is folly, I say. Insanity. Lunacy. I would sooner code in BASIC than publicly divulge my email address to the world.

Now, I hear you say, “So, genius, how do you provide such information if not in the signature?” Well, you are right to ask and also right to call me a genius. Pay attention, and I shall reveal to you how such is accomplished:

x = ("swDlw ms > mMm.hh@ttaiog" +   ##   Matthew D Moss, 888-555-1234
"<.cMmssoottaaee").split(//); z =   ##   Department of Fine Ruby Studies
[""] * x.size; puts x.map {z = x.   ##   University of Wherever I Like
zip(z).sort }.last[9].join + "\n"   ##   "He that runs Ruby, runs well."

Do you see it? You don’t, do you? Look again after I run this signature through the Ruby interpreter:

Matthew D Moss <matthew.moss@gmail.com>

The silence suggests to me that you are stunned beyond words. I think you are needing such a challenge…

For your task this week, I ask that you make your own signature such that displays your email address when run through the Ruby interpreter. The signature must fit within four lines of no more than 80 characters per line. (If you still want to avoid outputting an email address, your script may produce something else: a phone number, a funny quote, vCard, a poem to your love, whatever…)

Summary

Welcome, Ruby coders and coderettes… Tonight we bring you the Obfu Awards, awards given by committee (i.e. me) to those most deserving for their… “creative” work.

We’re going to skip the red carpet frivolities, as we have no red carpet, and jump right to the awards. Here they are, in no particular order (except that of their entry).

Best Non-Working But Terribly Obvious Solution

This award goes to John Perkins whose solution – while it generates an error – provides output that can be discerned by running the Ruby interpreter in your mind. Seeing as how Google provides wonderful spam filtering, thanks to at least fifteen Python hackers, the lack of an obfuscated email address is of little concern.

Most Prolific Use of gsub in a Signature

John Joyce puts forth a straightforward, easy to understand, solution that is his email address transformed by simple replacements. Not terribly obfuscated, but a good first step, and I believe the greatest number of calls to gsub within a single solution.

Best Unexpected Use of String#Unpack

Harry Kakueki makes interesting use of String#unpack by way of its directional and positional directives. While his attempts to confuse the source material were unsuccessful, his use of these uncommon unpack commands are worthy of notice.

Most Painful Obfuscation

The first entry from Mikael Hoilund is such a dangerous minefield of string manipulations and punctuation, the committee could not completely discern its operation. In particular, putting aside the call to downcase! (which we managed to discern after much coffee and doses of Ritalin), this segment of code was never fully understood:

*a=e=?=,!????,:??,?,,Email

We’d ask Mikael to explain himself to the committee, but we fear the medical consequences.

Best Looking Non-Email Output

Rather than provide his email address, Sandro Paganotti chose to display his logo, specified in a run-length encoded string, specifying alternate sections of “on” or “off” characters. A couple reverses and flips here and there grows the logo and generates more output than code was input.

Highest Data-to-Code Ratio

Phillip Gawlowski receives this honor, for using a simple unpack to decode his UUEncoded name, email address and web pages.

Special Award: Solving Two Quizzes In One

A very special honor goes to Bill Kelly for a finely golfed solution to two quizzes at the same time. His tiny Turing Machine not only works, but fits both the machine and the code required to print his email address within the space restriction for this quiz. Bravo.

Most Rentable Space (and Use of Non-Standard Number Bases)

Marcelo Magallon’s use of a base-36 number, simply converted to ASCII (base-256) did not fool the committee, but it was quite elegant.

The “I Like Π” Award

A cute and curious technique, Steven Hahn used the digits of π to offset the characters of his email address. Sadly, we were hoping for lemon meringue.

Best Abuse of a Random Number Generator

Random numbers are supposed to be random… except when they’re not. Chris Shea puts this to use to ensure the scrambled letters of his email address are shuffled into the correct place. The need to vary this per-platform is a sad consequence, due to variations in the generators.

The “Thank Goodness He Provided An Explanation” Award

Once again, Mikael Hoilund taunts us… or should I say, haunts us. We tried, we really tried, to understand his code before giving up and reading the (thankfully) provided explanation. After that, we were able to follow along and understand the code, and have come to two conclusions. First, Mikael has taught us how to abuse those we don’t like. Second, Mikael should not be allowed near the % character ever again.

Best Gratuitous Use of the Web

For his second entry, Harry Kakueki places a portion of his email address on the web, and another portion in the code, a simple GET and gsub completes the address.

Most Obfuscated Code (Well, Except for that Mikael Guy… You Know Who We’re Talking About…)

Sergey Volkov presents a markedly obfuscated bit of code that is characterized by his self-inverting transform. The use of $& made available by the regular expression, instead of a parameter for the gsub block, was tricky. Using %$$ as an empty string for converting ASCII values to single-character strings was a clever ruse. We wonder if we shouldn’t take away the % character from Sergey as well.

Best Attempt to Scare the Committee

Seeing Mikael Hoilund’s third submission, we fretted. At first, no one dared to look. But as we are gluttons for punishment, we relented, only to see this silly attempt to print “42”. Still, we worry what might happen if we ask Mikael to write a spreadsheet or calculator.

Longest Binary Sequence Seen In A Submission to this Quiz

Congratulations to Jesus Gabriel. It’s the longest binary sequence. We’re fairly certain of that.

Most Obvious Need for an ASCII Table

The solution provided by Andrew Nelson was simple, quaint, obvious. And we all know 65, but can never remember 110 or 114. Google, I’m feeling lucky about “ASCII table”.

Best XOR Decryption of a Base-64 String to an ASCII String in a Ruby Quiz

The award goes to Come Milan for… well… doing what I just said. Next!

The “Is It Unstable? I Forget How Floating-Point Works” Award

Our final award goes to Adam Shelly who does some things to floating-point numbers, then a few more things, then makes them integers and gets a remainder… or something… but anyway it works, but will it work everywhere? Who knows?


Wednesday, February 04, 2009