[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [Fun With Perl] Paranoia.



Bill Jones wrote:
> 
> It prints:
> 
<snip output> 
> Plus there is a hidden message. :]
> (No, not in the above, but in the
> original source I posted...)
> 
> PS - I didn't write it, I just want to
> understand it :)

Ooooh ooohh I think I get it! (and I've never understood any of that
obfuscated stuff before!)

Somebody more perly than myself will correct me if I am wrong, surely.

Starting from the end..

That big honking string is a list of a buncha numbers shuffled with
letters (which form the secret ssage.)

The hidden message acts as the seperator netween the numbers, so the
split returns 

(1,18,53,17 [...] ,6,0,3)

map takes that list and sends the elements one at a time to the internal
part, which is this (expanded)..

(
split //, (' $().s/rlenJ2Ei;o"_MNP'.'3Ot5{R}G*k,HILSTp1X\ab4cduvwhgA=')
)[$_] 

The split looks like it builds a list of characters as such every
character used in the output is in there (it must be.. although I must
admit I didn't check _all_ of them)):

( ' ', '$', '(', [...], 'A', '=')

and the [$_] takes the nth element of said list.  Of course, $_ is each
value of the first list of numbers in a row, so after mapping those
original numbers onto this list, we have somthing like:

('$', '_', '=', [...], ' ', ')')

Join puts those all together to make (expanded):

$_="JOIN THE JAX PERL MONGERS J acksonville Perl Mongers J\n"; 
/ ((.)) /; 
do {
    print substr($_,25); 
} while ( s/((.).{23}) $2 (.)(.*) (.)$/$1$5 $2 $4 $3/ )

which does (I think - my regexing sucks .. I havent read the owl yet -
just got it Wednesday. :D )

Set $2 to J (the first character in $_, selected by ((.)) ) 

Take any characters in $_ after the 25th and print 'em

Take the $_ string and match it on 24 characters (saved as $1 and the
first of that string saved as $2), then a space, then the J(from the
former $2) then a character(saved as $3) then a buncha characters (saved
as $4), then a space and a final character ($5).  So, 
$1 = "OIN THE JAX PERL MONGERS"
$2 = "O"
$3 = "a"
$4 = "cksonville Perl Mongers"
$5 = "J"

Then rearrange these so $_ is now 
"OIN THE JAX PERL MONGERSJ O cksonville Perl Mongers a"

then do it again and again and again until there are no more characters
left for $4 (I think) to get.

and eval evals it.

Whew!  That was a lot of fun to take apart!

Somebody correct me if I'm wrong.

> 
> One day, I will!

Maybe that'll be today!

Cheers, everyone!

-eric

print "Just another FWP lurker.";  # :^)


-- 
Q: How does a quantum logic chicken cross the road?
A. The chicken is distributed probabilistically on
   all sides of the road until you observe it on 
   the side of your choice.
   
*------------------------------------------------------*
*    eric von zee     *------* tritech marketing inc.  *
*   web  developer    *------* evonzee@tritechnet.com  *
*  www.tritechnet.com *------*   630.654.0170 x 129    *
*------------------------------------------------------*

==== Want to unsubscribe from this list? (Don't you love us anymore?)
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org