Obfuscated Email (#163)

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 DJ Jazzy L. 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 l

Most Prolific Use of gsub in a Signature

John J. 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 K. 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 P. 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 G. 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 K. 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 K. 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 V. 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 S. 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?

Overall, a lot of great submissions. I most definitely learned some
things
here.

There will not be any quiz provided tomorrow. Family is coming into
town.
See you again in a week!

Matthew M. wrote:

Google, I’m feeling lucky about “ASCII table”.

I learned something cool today: “man ascii” provides an ASCII table.

-Dana

On May 22, 2008, at 2:24 PM, Matthew M. wrote:

that of their entry).
Your summaries are always more fun than mine were! :wink:

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

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

Ouch. Let’s break it down.

First we need to get it to run:

Email = Object.new
=> #Object:0x389190

*a=e=?=,???,:??,?,Email
=> [61, 63, 44, #Object:0x389190]

It’s just a really complex assignment, we can see.

*a = …

Slurp an Array into the variable a.

… e = …

And store the first value of that Array in e.

… ?=, …

The ASCII value of the character = (61).

This next bit is very tricky. I had to play with it in IRb a bit to
figure out how Ruby parses it, but it plays out as:

… !?? ? ?, : ??, …

The conditional is the opposite of the ASCII value of ? (always true,
which not switches to false). If it was true, it would become the
ASCII value of , (44). However, since it’s always false it becomes
the ASCII value of ? (63).

The last bit is much easier:

… ?, Email

That’s just the ASCII value of , (44), followed by the contents of the
Email constant.

James Edward G. II

On Thu, May 22, 2008 at 2:24 PM, Matthew M. [email protected]
wrote:

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.

I didn’t contribute because I can’t keep up with you people :). But
I’ll say it was a great quiz and an awesome summary. Thanks, Matthew!

Todd

On Sun, May 25, 2008 at 12:02 AM, Matthew M. [email protected]
wrote:

my original file.

And, sadly, my brain doesn’t work all that well anymore. :wink: I can’t
remember what I had intended to say. Once I come up with something
clever, I’ll fix the web site.

It was however a brilliant quiz, and a brilliant summary, I however
had a brilliant??? idea too, but I need a year to answer the quiz :frowning:
The idea was Gödelizing my signature into one very biiiig number,
expressing this biiig number in a clever expression that would
fit the quiz size constraints and ungödelizing would just take half of
a line or even less.
However factorizing the biiig number is not an option, and so I was
trying to create products out of the first 10000 primes and then I
might find some clever expressions using them, but even that will take
weeks :(.

Cheers
Robert

http://ruby-smalltalk.blogspot.com/


Whereof one cannot speak, thereof one must be silent.
Ludwig Wittgenstein

This award goes to DJ Jazzy L. 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 l

I was reading over the summary I wrote, and I don’t know what happened
to the rest of this paragraph. Must have accidentally killed a line or
two in vim, 'cause the complete paragraph isn’t on the website nor in
my original file.

And, sadly, my brain doesn’t work all that well anymore. :wink: I can’t
remember what I had intended to say. Once I come up with something
clever, I’ll fix the web site.

Robert D. wrote:

It was however a brilliant quiz, and a brilliant summary, I however
had a brilliant??? idea too, but I need a year to answer the quiz :frowning:
The idea was Gödelizing my signature into one very biiiig number,
expressing this biiig number in a clever expression that would
fit the quiz size constraints and ungödelizing would just take half of
a line or even less.
However factorizing the biiig number is not an option, and so I was
trying to create products out of the first 10000 primes and then I
might find some clever expressions using them, but even that will take
weeks :(.

In other words, you had a brilliant solution to the problem, but it did
not fit in the margin of your email? Oh, we have heard that one before!
:wink:

In other words, you had a brilliant solution to the problem, but it did not
fit in the margin of your email? Oh, we have heard that one before! :wink:
If I had known that I would not have bothered you, well actually I
have never seen such a bold claim before :P…
But it did not fit in the time frame.
R