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;

In reply to Re: First Obfuscation, Make it Plain? by datahead
in thread First Obfuscation by Big Willy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.