![]() |
|
laziness, impatience, and hubris | |
PerlMonks |
Re: Live and Dieby de_cristian_izer (Initiate) |
on May 27, 2005 at 16:08 UTC ( #461122=note: print w/replies, xml ) | Need Help?? |
So this one was tricky since it didn't run out of the box due to a problem with quote escaping in the exec ...
So here is the solution, that we, a collective of rebel monks for CLEAN CODE have to offer :
Most of the steps are unclosed in {} , to add some obfu .
Rock on !
Then we initialize the hash %$^ with two values.Key 1 is the strange _/ sign and key 0 is the new line operator ! This is very tricky since it looks like an empty string but the fact that the carriage return is between the two quotes is taken into account !
In the next block we do : This is done to protect the arguments passed to the exec and didn't work with perl 5.6 on windows and 5.005 solaris . So we did instead : Now comes the call to this same script via exec, passing the shifted @_ as an argument and testing if there is more than one argument . At this point you see that this will either print _/ or spaces or new lines and it is the choice of the numbers in the initial list that gives the following result :
ps : since it failed on our box could you tell us on what kind of OS and perl version did you run it ??
In Section
Obfuscated Code
|
|