in reply to Re: Better labeling of obfuscated code section
in thread Better labeling of obfuscated code section

I'm 100% sure that those who write golfs don't use them in production.
The same can't be said for those who don't write golfs...

11 years ago, shortly after starting to use Perl, my client demanded that I implement "encryption". I had no idea how encryption worked, or how to implement it in Perl. CPAN was young, and not nearly as rich as it is today.

So I searched Google, and found this: RSA in 3 lines:

#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1 lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)

This was used by my client for years to encrypt and transport customer data from a website via FTP.

It worked, but I wouldn't recommend the practice :)

Clint

Replies are listed 'Best First'.
Re^3: Better labeling of obfuscated code section
by f00li5h (Chaplain) on Aug 12, 2007 at 11:49 UTC

    Yes, the same is true of golfs as of obfus... they can get you in trouble in a production environment.

    I'm surprised you didn't wake up one night with an axe in your spine, and an angry man in a black tshirt standing over you ranting about revenge...

    You were lucky this time ;)

    @_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;