Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

As evolution of this old idea, here is new and less dumber alphabetical obfuscator. Any bug reports and ideas how to squeeze its results are welcome.

#! /usr/bin/perl -X %code = ( "\t" => "chr oct ord w", "\n" => "chr hex a", ' ' => "chr oct hex ffa", '!' => "chr hex hex hex f", '"' => "chr oct oct hex ceaa", '#' => "chr oct hex abaa", '$' => "chr oct hex afaa", '%' => "chr oct oct hex daaa", '&' => "chr hex oct hex cda", "'" => "chr oct hex baba", '(' => "chr hex oct hex daa", ')' => "chr oct hex caaa", '*' => "chr oct hex ceaa", '+' => "chr oct sqrt hex afa", ',' => "chr oct sqrt hex baa", '-' => "chr oct hex daaa", '.' => "chr oct hex ddea", '/' => "chr oct sqrt hex cba", 0 => "oct a", 1 => "m mm", 2 => "int log hex a", 3 => "int sqrt hex a", 4 => "int log ord a", 5 => "int log hex aa", 6 => "chr sqrt hex baa", 7 => "int log hex aaa", 8 => "int oct ord l", 9 => "int oct ord w", ':' => "chr oct oct ord n", ';' => "chr sqrt hex daa", '<' => "chr oct oct ord p", '=' => "chr sqrt hex eaa", '>' => "chr oct oct ord r", '?' => "chr sqrt hex faa", '@' => "chr oct ord d", '[' => "chr oct oct hex cd", "\\" => "chr oct oct hex ce", ']' => "chr oct oct hex cf", '^' => "chr oct hex hex dfa", _ => "chr log sqrt exp hex be", '`' => "chr hex oct oct ord p", '{' => "chr oct hex ad", '|' => "chr oct hex ae", '}' => "chr oct hex af", '~' => "chr oct oct hex ord h", ); $_ eq eval $code{$_} or die "Code '$_' (ascii " . ord . ") mismatch +\n" for sort keys %code; undef $/; $_ = <>; while ( /([A-X][a-x]+) # 1 |([A-X][A-X]+) # 2 |([C-Z][c-z]+) # 3 |([C-Z][C-Z]*) # 4 |([AB]) # 5 |([a-y]+) # 6 |(z+) # 7 |(.)(\8*) # 8,9 /sgx ) { $i = lc $+; if ($1 || $2 || $3 || $4 and 1 + eval { prototype "CORE::$i" } and + !$@ or length ($4) == 1) { $j = $1 || $2 ? "y" : "b"; $i = "q $j$i$j"; } if ($1) { $s = "s zzucfirst ${i}ze"; } elsif ($2) { $s = "s zzuc ${i}ze"; } elsif ($3) { $s = "s aaucfirst ${i}ae"; } elsif ($4) { $s = "s aauc ${i}ae"; } elsif ($5) { $s = "s zzuc q y${i}yze"; } elsif ($6) { $s = "s zz${i}z"; } elsif ($7) { $s = "s aa${i}a"; } elsif ($code{$8}) { unshift @s, "s zzchr ordze" for 1 .. length $9; $s = "s zz$code{$8}ze"; } else { die "Unknown symbol '$8'\n"; } unshift @s, $s; } $_ = (join " x ", @s[@s/2 + 1 .. $#s], "eval if ") . (join " x ", @s[0 .. @s/2]); s/(.{1,79})( |$)/$1\n/g; s#(.+)# $_ = $1; s/^(.{${\(int rand length)}} )/$1 / while 79 != length; $_ #eg; print;

Update 23-APR-02: source slightly modified.


In reply to Yet Another Obfuscation Engine by mtve

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!
  • 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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (10)
    As of 2015-07-30 23:03 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (273 votes), past polls