Forum: Ruby mini-contest: try to crack this snippet ("Happy 2007!" Ruby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mauricio F. (Guest)
on 2007-01-06 22:02
(Received via mailing list)
http://eigenclass.org/rubychallenge2007

Your mission, should you choose to accept it, is to find the secret
message
hidden in a Ruby script, follow the instructions to generate the code
that
will prove you've found the message, and report it via eigenclass.org
(more
details at the above address).

This script works with Ruby 1.8.5 (also tested with -p12); alternative
versions for Ruby 1.8.2, 1.8.3 and 1.8.4 are also available.
If you want to try to crack the script, it's safer to download it from
http://eigenclass.org/rubychallenge2007 (cut&paste fails too often...)

One request: please don't publish your hints/solutions --- let's try to
keep
the challenge interesting for future readers. Thank you.

The script must be saved as happy2007-eigenclass.org-1.8.5.rb (exactly)
and
run with Ruby 1.8.5, without RubyGems:
  $ RUBYOPT="" ruby happy2007-eigenclass.org-1.8.5.rb

I hope you have fun.

#OrNYAMv67ABbqnK01lSLaHsKlmOBIwcFqzuEXezq5cAYnu6IFvAF8IBXMDCp8R7NheeL13UiFV39S
"02312ZqeVxtl3gw6NVawApA9bwn9LLGBfE/66UCuABlSFVRSr00stZa7YkchPYzsaMdQcLWp5xKCd
0BUpoXvq5vnxVMgz29HvqTrnZVpDfDpWKB3m0uCcBY4rKSFoQ3rWDi8lArMyig2/nPObKuucdhlQjt
OkQMgNXiH9l+bOmeMpiNTN8PIZoEcFFl0YwtcSXGOo4Tam21XPf7N9izo/7LAemLSG3mZ55cAgLegq
+XJoRGtDMLrDj  Ho7b9Q
I/IeCa60CPfzR2rTh2Ng9aNLsxYLxBUS+ZnRJHQmmjGo6v4FfBnIVZx
h0XTyv0X4+jcA  wmWsmS
4cpRZ1ev7zmwvbWMFG5KZlDPoBLlgWoqe2FoDKx3q3n/UDmi6beIMdO
nz4VAxdGERKv3  cki9FT
O8aHKbLlx/BlP4hcD+63B+eRpAgK58DnV4sUKvo9BCuwQqM8k6WcDqS
WP7ZNGiW8eA4y  UIfsyd  kX1v     mUI  Z   FCsr  A   EUS  ao47J
GMlefa8WAd0b0UN
YsfAiDTOmWugK  9MDpTe  gqE cz/7  cy   l1  86M   kf  P6n  TLf
bxh5zibUMKyMmmGx
8OK5/1KjPRq1X          aFUZkijk  Qo  Lx/Y  8R  7P38  WV  ZL0
6Spf3M+okFpRQg2G
UpfuWbtyB06BH  2Eu/vZ  tbS       AW  8kGx  It  8VEl  JP  UZ2
8zosYQvGPPiDJmwU
BpD+lkFRe/Piu  3kydXF  Ij  oHL5  ud  mbSy  Ti  6bwe  daK  a
HYPybXbENNQlJoSGr
CMCxXR3KlonNk  NOCefm  +4  fq6H  9o  Yi0S  vk  +a1W  AWx  S
AT5p/7w4YkUrFIxo/
TESZLgRi1KIkw  Nz4c8t  NV  yVB   E5   eU  E/h   Av  hev6v
vd5lgvX4xykKm2PzV
EvGksbbXFjezU  Ennwvv  FtT    K  2y  J   c8h+  /   8NaJwN
VbFruIzmZ6A9GomBIV
1nN0eUMI5vdwTBD/034y6pP3gO9+tgY/Z+u  D5oBVQlu  jNK/74Mua6i
RAmHBnc7jSxvMB9os7
OE0v5q0/qNXYL7jfOZJ0Pgbnvih4ViB6ZWW  LGu13Bdl  fV3pNN49KZ
Ra1rjx0Vtd6bbnVVFyO
uzaad8w90GXhl52Q4hIkcKYeiT6TJ1O05ir  eODiQFTS  JRdOZ70m
PhyljHwB/FPzjJvSseqW
tJab3eZ+6uRFmEwsYCc37P2/24slUQ1f7d9eDpZ4NS4rVlaeIx5qH1fvZis8SUTGi3qT4BuK/wwGJb
Dfw3dLu2uzIF4LbRzEl59Ni7EC0q/Pj0FUlY25CESpCiX7Tn8VhzJP7ObzONwpB1IptdshseudGY2F
jeivpdahI26bvOWlPzb     h1f+9T    IK6oAn    TerM
3DRb4S3gk+PjoejtttW6Ee
PcnmtNVDNCAcOB9NV5 FWRh  38FS  tp  7KCq  1k  6M4yO6ILq
xVRpWPwqzICh9sav/u2Pnp
MHxn4RF3UPxPtMnRc6XxvZHX  it  ld1g c/u  l8v5 1j7p6vM4
ltqOtjAetny2g14uvLGKYC
fAKn38RogjLz50xMtrw4aPl3  Gt  1J6e  tr  of90  0j35GGQ
vv+TvjX4SeKRn1HPfGS8mjV
utf/Mh4BFfMdnT8xsCqPMdy   IW  vb0L  pm  KgON  w0clVkY
PlyjUZVqIN2spadEG40Zib7
geEI0WDd12Wfv45sont9TAE  L5m  BpSO  6w  NfW5  Js9hP8
+UTtyV7vM75mIpxomFHjHWFT
yNDKGiMk3lJmW3RbGBmTyk  c8bJ  /kEZ  /J  cvad  O3JCFi
TvOhTHvMkcEkG7Rto/vzg1TD
ThuG4tBCTsMrV4enitht+  ITOE4  2Fr5  sa  v9ag  7lIZw
EYHMdZFbRlO8blKy1q1tOQtxZ
2hQwARL2xBVaMQayxKry  FzHVyZ  xCS5  go  DAcn  jKXp/
tkWXIhFV3uDGDgXBfPGJZ69qS
hfGaODSze+D/ixRRfeL  yRMMFlkE  mt  t0Ig  Mm  fWqbV
gXMbbZ7UN3GelWTpEbAsKa12W
bqDUMPbQLy16Da85we        jnb/    qayEBP    Jt5kDC
foIihFX3rGmjv8H35nLt4bwKg7
SV2t9d9QPLEGEBIexr69FqX3fLii4UUouUUfs8RLJAHgWEoztt1tloZ8I7TsBpGtfTJntGyZdwcKEW
NW7BTaYhVj70niCV4Ws407gIjZN5gIW1XeplrvpKEOGzuN9vmynojJOdgVfVV2hgJISHMCZHYehge0
jzGCFECNwaUmxJiP80PRWWwjBY7hKnjhQjvyvhtGcNMEZAQPKYPYJcYQFIrCVjzDQmZUnZXNBu7SIy
qneV+2/f4rOxDgu56FqYA39CAgtCVQTwmrWkpFt1M1ACFnacRf9ypJgS1kEURs3xx2/dngv0YGiSZG
tiLXL3PyxR8mv21RsVCD2wA00400eNo1kFtLAzEQhd/zK8YiVKENVRBFEKEIPpWK1Ic+Zjezu6O5LJ
mEdf+9k8U+5TLnO2dm9sfj4QqUOscClmxYZ7DYFUbIA0ITfQNtTAnb7Gat3sjCLEofLXXzIhlT7JPx
EBMkDMYjUH6F0wWeyDnA39FFK5VuoW2UGOVNoLE4kysBrUkS69wMN/IyjuOFYpgGDP/gBkyGTB55Ay
L5LpwhlaAq0xsKUEImVw15iBMvHUqON5liuNXqYH4QuCSsfms5BA4U+kpMlAf4LM0Md/pJPwhnQbqq
KylcNbX2jp43SjQlMOa8fH/tz8eP07OC68v9ZbUSZ1ENZhzn+93ucYvUY2idYdYx9dslQqdGqboqxj
ZhBhmLTS/7kJkNLead7LWOToHJotZa/QG9gJR7nNQde2XvHS8rqELruQqnMCQYPOvJepTOCl79AioL
".instance_eval{|$x|def h(q)q.unpack("m*")[0]end;def
k(z);Zlib::Inflate.inflate(
z)end;require'zlib';rr=eval k(h(File.read($0)[-605..-2]));ps=false;puts
rr if ps
begin;class<<$<;class<<self;class<<self;def f;end;f;end end end;rescue
NameError
p=lambda{rr=(rr.to_i*214013+2531011)&(2**32-1);(rr.to_i>>16)&0xff};begin
v=$x.
gsub(/\s+/,"");v2="";h(v[5,k=v[0,5].to_i]).each_byte{|b|v2<<(b^p[])};eval(k(v2)
)[$x];rescue Interrupt;rescue Exception;puts
k(h(v[10+k,v[5+k,5].to_i]));exit(
42);end;else$W||=SCRIPT_LINES__={};class<<$<;class<<self;class<<self;def
self.x;
end end end end; load($0) end};exit
# Copyright (C) 2005-2007 Mauricio F. <removed_email_address@domain.invalid>
#                         http://eigenclass.org
# Get the hidden message and claim your prize at eigenclass.org!
__END__
eNpVUVtr2zAUZo817D+IYBOp2RSnS9ouqh/cxQ2GxYEmbLAsCFk+zbw6tifJpeTy36c4g1G9SDrn8N1O
3RjdnURf5pM4mVJKUTxN5o8RmkWLRTiNFug+ejj9wySehct4nnSZgj9NrgB1s3wD2vS32ajruN+ix/v5
IkIoQGVeOCZ4yAugCkSGXZ8wPPB9v6dEmeGR7xNCTb4FvU9hk5dMfEgDPKD0itCtqPftlKE63wE5Ul0p
w+BFFNisBKXp+tJinZGuLBCxerRsAEWvEmqTVyWDMjs6jstFsFozDYYbJSTwp6aUqFaV3B8uBT/Y/t0d
FpxmUIABLgweEiY4OTLXBJNwGbITCXv/FgFbd4TJQmiN5ulvkIY1ZQZPfAvmV5WhcY3+CbKDyEphtol3
QefTYDi6Ho461nrFc8YmbXrj8WwyoucksZV0auqeFEUB6vx2O3SjoMZ9qlK3T85Fz/vpac87XZnncf41
TiLOe9g1tK50gL3/58zXe7MOqqUosacuVuHHH2tMyfLdBWkDt97bKQv1/XDYHwm1yTegV/66Zbaba8pa
yGfcSTrEVpGHrm8G/u3tzefWLdo5fwFjGbgl1
vasudevram (Guest)
on 2007-01-07 16:01
(Received via mailing list)
Mauricio F. wrote:
> http://eigenclass.org/rubychallenge2007 (cut&paste fails too often...)
> #OrNYAMv67ABbqnK01lSLaHsKlmOBIwcFqzuEXezq5cAYnu6IFvAF8IBXMDCp8R7NheeL13UiFV39S
> BpD+lkFRe/Piu  3kydXF  Ij  oHL5  ud  mbSy  Ti  6bwe  daK  a  HYPybXbENNQlJoSGr
> MHxn4RF3UPxPtMnRc6XxvZHX  it  ld1g c/u  l8v5 1j7p6vM4   ltqOtjAetny2g14uvLGKYC
> jzGCFECNwaUmxJiP80PRWWwjBY7hKnjhQjvyvhtGcNMEZAQPKYPYJcYQFIrCVjzDQmZUnZXNBu7SIy
> p=lambda{rr=(rr.to_i*214013+2531011)&(2**32-1);(rr.to_i>>16)&0xff};begin v=$x.
> IkIoQGVeOCZ4yAugCkSGXZ8wPPB9v6dEmeGR7xNCTb4FvU9hk5dMfEgDPKD0itCtqPftlKE63wE5Ul0p
> w+BFFNisBKXp+tJinZGuLBCxerRsAEWvEmqTVyWDMjs6jstFsFozDYYbJSTwp6aUqFaV3B8uBT/Y/t0d
> FpxmUIABLgweEiY4OTLXBJNwGbITCXv/FgFbd4TJQmiN5ulvkIY1ZQZPfAvmV5WhcY3+CbKDyEphtol3
> QefTYDi6Ho461nrFc8YmbXrj8WwyoucksZV0auqeFEUB6vx2O3SjoMZ9qlK3T85Fz/vpac87XZnncf41
> TiLOe9g1tK50gL3/58zXe7MOqqUosacuVuHHH2tMyfLdBWkDt97bKQv1/XDYHwm1yTegV/66Zbaba8pa
> yGfcSTrEVpGHrm8G/u3tzefWLdo5fwFjGbgl1
>
>
> --
> Mauricio F.  -   http://eigenclass.org   -  singular Ruby

> Mauricio F.  -   http://eigenclass.org   -  singular Ruby


Nice one :-)

I guess I must have a built-in Ruby interpreter in my brain. I didn't
even need to read the code, let alone write any, to get the solution
:-)

Vasudev Ram
http://www.dancingbison.com
Mauricio F. (Guest)
on 2007-01-08 02:52
(Received via mailing list)
On Sun, Jan 07, 2007 at 11:00:21PM +0900, vasudevram wrote:
> I guess I must have a built-in Ruby interpreter in my brain. I didn't
> even need to read the code, let alone write any, to get the solution
> :-)

Impressive! I myself can hardly decode base64 in my mind, let alone
zlib-decompress it or ... :)

I can see lots of "GET /rubychallenge2007/Happy2007 HTTP/1.1" and
similar in
the logs, but AFAICT only 9 people have cracked the code out of 206 so
far.
10 including you ;)
_why (Guest)
on 2007-01-08 08:21
(Received via mailing list)
On Sun, Jan 07, 2007 at 11:00:21PM +0900, vasudevram wrote:
> I guess I must have a built-in Ruby interpreter in my brain. I didn't
> even need to read the code, let alone write any, to get the solution
> :-)

Zed S. did it blindfolded, hands tied, with a cigar in his mouth.  He
didn't
even have to say anything.  A bit of that white-and-green tractor-fed
paper
spilled out of a crease in his forehead.

_why
Evan W. (Guest)
on 2007-01-08 11:10
Pfff. I fail to see Zed on the list.

Evan W.
Jason M. (Guest)
on 2007-01-08 14:35
(Received via mailing list)
On 1/6/07, Mauricio F. <removed_email_address@domain.invalid> wrote:
> the challenge interesting for future readers. Thank you.
I'm curious about this - I've seen a few of these on the list now - can
anyone point me towards a general how to on how to crack these?
Robert D. (Guest)
on 2007-01-08 16:05
(Received via mailing list)
On 1/8/07, Evan W. <removed_email_address@domain.invalid> wrote:
>
>
> Pfff. I fail to see Zed on the list.


He's too modest

Evan W.
>
> --
> Posted via http://www.ruby-forum.com/.
>
>
Robert

--
"The real romance is out ahead and yet to come. The computer revolution
hasn't started yet. Don't be misled by the enormous flow of money into
bad
defacto standards for unsophisticated buyers using poor adaptations of
incomplete ideas."

- Alan Kay
This topic is locked and can not be replied to.