Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

My first obfu

by mpeg4codec (Pilgrim)
on Apr 15, 2006 at 06:45 UTC ( [id://543498]=obfuscated: print w/replies, xml ) Need Help??

Be kind, this is my first obfu! This sad little bit of code was something I hacked together for a birthday card for a friend who knows a little Perl.

Yes, I understand that it's extremely simple and can probably be done in less than one line. But hey, give me a break! It took me a little while to come up with something slightly clever, and I'm proud of what I managed. Sorry, no ``JAPH'' this time.

And if you're wondering, this was my (also) sad attempt at an ASCII birthday cake.

$_=' $ _ = \'})fer(fi)]1[>-_$x )]0[>-_$(rhc(tnirp; fer!fi)_$rhc(tnirp{ )_@(hcaerof;)01,121 ,79,001,401,611,411 ,501,89,23,121,]2,2 11[,79,401(=_@\';ev al(reverse(split(// )))';s/\s//g;eval##
Constructive criticism is greatly appreciated.

Replies are listed 'Best First'.
Re: My first obfu
by chargrill (Parson) on Apr 20, 2006 at 03:38 UTC

    I golfed it down a little and furthered the obfuscation a bit as well, but kept your basic premise. The golfing removes some of the easy readability of your original code garnered by running the likes of:

    $ _ = ' $ _ =\')01,121,79,001 ,401,611,411,501, 89,23,121,]2,211[ ,79,401(rof)rhc:] 1[_$$x)]0[_$$(rhc ?)fer((tnirp\';s, ,reverse,ee';s'\s '$_'geex;m,,mgsix

    And I just noticed that my version seems a bit harder to handily pick apart with sed | Deparse (or variation thereof) - the de-obfuscator needs to do a bit more work.

    $,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://543498]
Approved by prasadbabu
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-22 00:54 GMT
Find Nodes?
    Voting Booth?

    No recent polls found