The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
A Ruby challenge: defuse the code bomb and test your Ruby fu

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eigen Class

Posts: 358
Nickname: eigenclass
Registered: Oct, 2005

Eigenclass is a hardcore Ruby blog.
A Ruby challenge: defuse the code bomb and test your Ruby fu Posted: Jan 9, 2006 1:58 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eigen Class.
Original Post: A Ruby challenge: defuse the code bomb and test your Ruby fu
Feed Title: Eigenclass
Feed URL: http://feeds.feedburner.com/eigenclass
Feed Description: Ruby stuff --- trying to stay away from triviality.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eigen Class
Latest Posts From Eigenclass

Advertisement

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) ruby.png

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.png 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.


Read more...

Read: A Ruby challenge: defuse the code bomb and test your Ruby fu

Topic: Ruby on Rails Sucks Previous Topic   Next Topic Topic: Shalom!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use