This was my first attempt at obfuscation. I imagine that is use some very common techniques...

#!/usr/bin/perl -w $_="a<j3 8]}9[ 1~2+ -62` 4,+,.j?23h`}|{qj46] #+.*,)";$h=H8; y|!&#'%;@*().,$"^:\|{}[]+_\-?<~` a-z0-9|a0c6e8b12345d7f9|d; $_=pack($h,$_);tr#U-ZA-T\#7^?2g(&p:#J-ZA-I#;$_.="\n";print;

Replies are listed 'Best First'.
Re: First Obfuscation
by gregor42 (Parson) on Mar 14, 2001 at 23:55 UTC
    Fair enough... Your first obfuscation, and my first crack at working one out....

    SPOILER:
    First $_ is set to a confusing looking string with lots of brackets & stuff in it.
    Next the regex y is used with the d modifier. (It's an alias for tr) This converts all of the weird looking characters to legal hex code characters.
    d deletes all characters found in SEARCHLIST that do not have a corresponding character in REPLACEMENTLIST
    Then $h is set to "H8" which will be used as a parameter for pack, telling it to use Hexidecial with high nybble first.
    pack is then called (why didn't you just omit $h altogether & write  $_=pack("H8",$_) ???)
    This produces a 4 letter string which is translated (this time actually using tr) to "JAPH"
    Then a newline is tacked onto the end & the result is printed.

    What makes this obfuscation work is the use of escaped delimiter characters in the Regular Expressions, they make it difficult to follow. 8-P
    It kind of reminds me of the solitare encryption proggy written in the Neal Stepenson Book, Cryptonomicon.


    --
    Wait! This isn't a Parachute, it's a Backpack!!!
Re: First Obfuscation, Make it Plain?
by datahead (Initiate) on Mar 24, 2001 at 23:56 UTC
    From a response to Big Willy's obfuscation. I am a newbie to PERL and if there are any other the obfusction and the response are not clear. I decoded the response to make it plain(er) to someone, who like me, has never written a line of PERL or knows anything about any flavor or UNIX. As a teacher this is what I do, make sense of obfuscation. Fair enough... Your first obfuscation, and my first crack at working one out.... #!/usr/bin/perl -w $_="a<j3 8]}9{qj46 #+.*,)"; First $_ is set to a confusing looking string with lots of brackets & stuff in it. Next the regex y is used with the d modifier. (It's an alias for tr) This converts all of the weird looking characters to legal hex code characters. d deletes all characters found in SEARCHLIST that do not have a corresponding character in REPLACEMENTLIST $h=H8; y |!&#'%;@*().,$"^:\|{}[]+_\-?<~`a-z0-9|a0c6e8b12345d7f9| d; Then $h is set to "H8" which will be used as a parameter for pack, telling it to use Hexidecial with high nybble first. $_=pack($h,$_); tr#U-ZA-T\#7^?2g(&p:#J-ZA-I#; pack is then called (why didn't you just omit $h altogether & write $_=pack("H8",$_) ???) This produces a 4 letter string which is translated (this time actually using tr) to "JAPH" Then a newline is tacked onto the end & the result is printed. What makes this obfuscation work is the use of escaped delimiter characters in the Regular Expressions, they make it difficult to follow. 8-P It kind of reminds me of the solitare encryption proggy written in the Neal Stepenson Book, Cryptonomicon $_.="\n"; print;