Here's a challenge for you. Test your Ruby fu and have some fun!
But first some context...
I have (re?)invented clay. Ruby clay. Take plastique.rb. Model the
shape of your choice. For example, here's a self-transported Ruby
(ruby.rb)
This is as visual as programming can get. Reshape the base64-encoded block
with the ASCII art of your choice (add spaces, break lines). If you need more
clay, append random garbage (/[A-Za-Z0-9=+\//+) to that string. Everybody can
do his own Ruby demo in a couple minutes.
The challenge
Plastic explosive (plastique) is soft and hand malleable; you can use
plastique.rb to create any shape you want, but see what happens if you modify
it. Or even rename it. Yes, it detonates quite loudly. Indeed, plastique.rb
only wants to run with
RUBYOPT= ruby plastique.rb
Anything else will make it go BOOM; ruby /tmp/plastique.rb is no good. Also,
beware of RubyGems in your RUBYOPT. It will also explode if you preload anything else as in ruby -rtracer plastique.rb
Here's the challenge:
challenge.rb (save as challenge.rb, it won't work if you rename it!)
This will only work with Ruby 1.8.4 or stable snapshots of 1.8.3 after Aug
2005 (unsure about the latter). If you download challenge.rb and when running
it as
RUBYOPT= ruby challenge.rb
it detonates, don't even try, it'd be too hard. But if it runs correctly, the
fun begins there.
So here's the challenge exposed as precisely as possible:
there is a hidden message inside challenge.rb
your mission, should you choose to accept it, is to decode challenge.rb's base-64 encoded text at the beginning
by doing so, you'll gain access to the actual source code running the demo and a secret message
the secret message will tell you how to prove that you managed to decode challenge.rb
you can drop a comment saying how long it took you (plus the proof that you did it :) if you feel like it
All means are allowed to get the hidden message. Enjoy.