in reply to Slashdot lamejoke generator
andsub ::{ ; my $i=$^; ; [split /#/, join $`, map {$i^=$_} split//,pop @_ ] }
%_ = map { my $z = (($_|=$^O)?$_:::($_)); $_, sub { while (pop) { my $x = unpack 'V',$_ ; push @| , ($x > $_ ? $x : $_ ) } print for @| } } 1..1024; ;
this bit of code is a fun transformation:
It takes an array or words, and returns an array of words. The first word of the returned array is composed of the first letters of the words in the input. the second words is composed of the second letters... and so on.sub _ { +(@;=>@:) = map {[split//]} @_; for (1..9) { push @: , join $&, map { shift @$_} @; } @: }
It is used here:
This re-orders the words output by the "_" function. 2,0,3,1,0,0,0,0,5 is the order. (Abuse of special variables here.)join ' ', @{[_(qw(oepgnf rhnuar nfarqr gu))]}[2,$?,3,$|,@;,5]
Yet more abuse of special variables:
These variables are referenced below, and are set to various rot13 strings. One of which was created by the "_" function above.($;,$:,$,,$\,$^,$==>$~,$.,$})=
yes.. because it rot13's the following code:map{sub { my $i=$!; join $&, map {my $o = $i; $i = $_; $o^$_; } split //,shift }; y;a-z;n-za-m;;$_; } @$_
Substitute in the special variables above, consolidate several cancatenations, and that would result in the array or strings to output.([q"Ia Sbivrg ", "rf lbh", "Rhffvn, $: $~" ], ["Ayy lbhe $~", " ner orybat gb hf", "rq $:" ], ["$; ornh", "rq $:", "jhys pyhfgre bs $~" ], ["$|. We".'v'."gr $~","$/3. Pebsvg", "r".qq-q-.' '.$:.".$/$=. ???" ], ["Tur arkg "."$: $~"=>"ef $} vg"." rneyl",q"vba jvyy ".'or'.qq' $^ fb +ba, ohg $.$,' ] )
Finally, that array is mapped to subroutines that output a given string, and placed in a hash:
of which one is then executed:@%= map { my $die =$_; sub { print for join $', @$die[ $%,$==>$|] } }
$%[rand @%]->();
OMG. That's the first time I've ever de-obfuscated a program. :) ++vroom! Good obfuscation, nice presentation, and funny output for slashdot readers.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Slashdot lamejoke generator
by jonadab (Parson) on Oct 04, 2003 at 00:14 UTC | |
by Notromda (Pilgrim) on Oct 08, 2003 at 00:28 UTC | |
Re: Re: Slashdot lamejoke generator
by Notromda (Pilgrim) on Oct 02, 2003 at 18:18 UTC | |
Re: Re: Slashdot lamejoke generator
by jonadab (Parson) on Mar 23, 2004 at 19:40 UTC |