in reply to Re: Lost in a sea of obfuscation...
in thread Lost in a sea of obfuscation...

I love obfuscation. These obfuscations aren't Perl, I've yet to do Perl obfuscation. Obfuscation comes into it's own using, what other languages calumny as "side-effects" and Perl folk know as 'features'.

I made a confusing method to produce a Just Another ... for each language. I found the suitability of each language to the job was telling and I tried to have fun with the language's idiom along the way.

The method is pretty simple:

When I wrote these, a Java / Perl war was ongoing at work. Not wanting to pick sides (why reduce the chance of a good scrap? :). I used Mutt's mailhooks, to "tune my subtle song". For posterity here are my sig lines (Please don't -- me for referring to other languages, I found the conciseness rang out from these. Yeah I know the Java is a tad long winded but.....)

# Frank Booth, AHEM DIGITAL (www.ahem.com) tel:(XXX) XXXX XXXX $_='Ozxy%fstymjw%';s:.:chr((ord$&)-5):geo;split//;print$_,map{ $_[$_]^chr((26,16,1,24,0,9,15,12,31,13,23,92,42)[$_])}(0..$#_) /*Frank Booth, AHEM DIGITAL (www.ahem.com) tel: +XX (XXX) XXXX XXXX */ main(){char l[0x1b]={"Ozxy%fstymjw%"};int i=0,I[13]={9,85,3,6,79,6,28, 14,25,5,0,0,14};for(;13-i;l[13+i]=(l[i]-=5)^I[i++]);printf("%s\n",l);} //Frank Booth, AHEM DIGITAL (www.ahem.com) tel: +XX (XXX) XXXX XXXX import java.*;public class S{String a=new String(s("Ozxy%fstymjw%O" ));int[] b={43,3,18,84,68,4,24,10,24,7,21,23,82,100}; public static void main(String[]S){S s=new S();System.out.print(s);}public static String s(String b){StringBuffer w=new StringBuffer(b);for(int i=0;i <0xe; w.setCharAt(i,(char)(w.charAt(i++)-5)));return w.toString();} public String s(){StringBuffer w=new StringBuffer(a);for(int i=0;i< w.length();w.setCharAt(i,(char)(b[i]^(int)w.charAt(i++))));return w .toString();}public String toString(){return a+s()+"\n";}}/* :-) */ <!-- Frank Booth, AHEM DIGITAL (www.ahem.com) tel:(XXX) XXXX XXXX> <html><body bgcolor=#666666 text=#CC9900>&#074;u&#115;&#116;&nbsp; &#097;&#110;&#111;&#116;&#104;&#101;&#114;&#153;&nbsp;<b>&#072;<!- ->&#084;&#077;&#076;&nbsp;</b>w&#114;&#105;te&#114; </body></html>

(The company name has been changed to protect the innocent, namely me ;0).

* Okay it's not a true rot routine, but I think this is:    perl -pe's/([a-m])|[n-z]/chr(($1?13:-13)+ord$&)/ogie'

--
Brother Frankus.

Replies are listed 'Best First'.
Re: Obfuscated? Moi?
by marvell (Pilgrim) on Dec 08, 2000 at 20:40 UTC
    /([a-m])|[n-z]/chr(($1?13:-13)+ord$&)/ogie

    I know this handles capitals, but isn't it a slight overcomplication of what is really: tr/a-z/n-za-m/

    Or is that part of the obfuscation? Sorry if I've missed the point.

    --
    Brother Marvell