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{$}{$,}}-$}{$=},$=+$.;$-+=e$}{$;}+$}{$=},$=+$.,$}{$}{$;}}^$}{$=},$ +}{$.}**($} {$,}+$}{$}{$=}})+$}{$;}*$}{$}{$.}}-$}{$=},$}{$}{$,}}*$}{$,}+$}{$.}*$}{ +$,};$-},do {-$}{$;}*$}{$.}-$}{$}{$;}}+$}{$}{$=}}**$}{$}{$.}}**$}{$.}*$}{$.};},do{ +$-=e$}{$}{ $;}}^$}{$=},$}{$=},$}{$,}+$}{$=},-$}{$=}+$}{$.}*$}{$,}**$}{$,}-$}{$}{$ +;}},$}{$.} *$}{$}{$.}}*$}{$}{$=}};$-+=e$}{$;}*$}{$;}+$}{$.}+$}{$.},$}{$}{$=}}+$}{ +$.}+$}{$}{ $,}}*$}{$;},$,,$}{$=}+$}{$.}*$}{$,}*$}{$}{$=}},$}{$}{$.}}*$}{$;}+$}{$. +};$-+=e$}{ $}{$,}}*$}{$.}+$}{$;}-$}{$}{$;}},$}{$;}*$}{$}{$,}}+$}{$;}+$}{$}{$=}},$ +}{$}{$}{$, }}}^$}{$}{$;}},rand,$=+$}{$=};$-+$}{$}{$;}}^$}{$=}})=~m$.{\$}{\$}{\$}{ +\$=}}}}$g;

--
David Serrano

Replies are listed 'Best First'.
Re: Easier than it seems
by teamster_jr (Curate) on May 08, 2006 at 13:11 UTC
    I couldn't sleep last night and started deobfuscating this. This is very rough and i haven't investigated too closely how it actually does stuff - just ran perltidy, then dropped some basic substitutions and dropped prints in certain places
    as far as i can tell the first line ("with adspace available") sets a hash with this:
    %}={ '6' => '1', '1' => '2', '3' => '6', '7' => '1', '2' => '3' };
    and sets
    $; $. $= $, to 3 1 6 2

    Update

    if we go through and recursively replace all the $} calls we get this:
    sub e { my ( $s, $w, $x, $y, $z, $c ) = ( ( join '', map { chr } 6 * 6 * 3 + 6 + 1, 6 * 6 * 3 + 6 + 1 - 3, 6 * $= * 3 + 6 + 1 - 3 + 2, 6 * 6 * 3 - 3, $= * 6 * 3 - 3 + 3 + 2, 6 * 6 * 3 + $, * 3 + 2, 6 * 6 * 3 - 6, 6 * 6 - 2 - 2, 6 * 6 * 3 + 6 - 1, 2**( 6 + 1 ) - 3 - 1, 6 * 6 + 1, 6 * 6 * 3 + 6 + 1, 6 * 6 + 1, 6 * 6 * 3 + 6 + 1, 6 * 6 + 1, 6 * 6 * 3 + 6 + 1, 2**( 6 + 1 ) - 3 - 1, 6 * 6 + 2**3, 6 * 6, 6 * 6 * 3 + 2 * 3 + 2 * 3, 6 * 6 + 2**3, 6 * 6 * 3 + 6 - 1, 2**( 6 + 1 ) - 3 - 1, 6 * 6 * 3 - 3 - 2 - 2, 2**( 6 + 1 ) - 3 - 1, 6 * 6 + 2**3, 6 * 6, $= * 6 * 3 + 2 * 3 + 2 * 3 + 1 ), @_ ); $s =~ s/(.+)/$1/ee; 0 + $s; } print chr for( join '', do { 1 ^ 1 }, do { $- = e $;+ 1, $= + $., 3 + $., $= + 1, 2; $- += e 1 ^ 1, $; + $., 3, $= + $,, $= + 2; $- += e 1 ^ 1, 1, $,, $= * $; + $, * 2, 6 + $;; $- += e rand, 6 * $, + $= - $., 1 ^ 1, 1 ^ 1, 2 + 6 * 2 - 1; $-; }, do { $- = e rand, 1, 3 + $., 3 + 6 * 2, 6 * 3 - 3; $- += e 1 ^ 1, 1, 3, 6 * 3 * 6 + 1, 3 + $.; $- += e 1 ^ 1, $= - $., $,, $= - 1, 3 * 6 * 3 + 3; $- += e rand, 1, 1, 3, 6 + 6 * 3 - 1; $- += e 1 ^ 1, 1, 1 ^ 1, $,; $-; }, do { 2 * 6 * 3 * 2 - 6 * 2; }, do { $- = e 1 ^ 1, 6**3 + 6**2 * 3 - 2**2, $,, 2 + 1 + 6 * 3; $- += e rand, 6**2 - 3 + 3**( 2 * 2 ) - 3 * 3 * 2 + 1, 1 ^ 1, 1 ^ 1, 1 ^ 1; $-; }, do { $- = e 1 ^ 1, 1, 3, $=, $,; $- += 2**6 + 6**2 + 3 - 2; $-; }, do { 2 + 2**6 + 6**2 + 3**2; }, do { 1; }, do { 6; }, do { $- = e 6 * 6 - 2, -1 + 3**( 2 * 2 ) + 3 * 6 + 6, 3, $= * $, + $= - $., 3**2**2 + 6; $- += 6 * 3 + 2 + 3**2**2; $-; }, do { $- = e 1 ^ 1, 6**3 - 3**( 2 * 2 ) - 2**( 2 * 2 ) - 3 * 2 + 1, 2, 2**6 + 1, 3 * 3 * 3 + 2 * 2 * 2; $- += 3; $-; }, do { 6 * 3 * 6 * 3 * 6 - 6**( 2 * 2 ) + 1 + 3**6 + 6 * 2 * 6 - 3 * 3 * 2 + 6 * 6 * 3 * 6; }, do { -6 + 6 * 6 * 3 - 1; }, do { $- = e 6 + 3 + 2, 2 + 3 + 6, 3, 2 + 6 + 3, 3 + 6 + 2; $- += e rand, 6 * 6 + 3 + 2, 1, 6 + 3, 2**6 - 2**3 * 2**2; $-; }, do { $- = e rand, 0 - 6 + 6**3 * ( 2 * 2 ) + 1 - 2 - 3**3 * 2, 1; $- += $,; $-; }, do { $- = e $,, -2 * 2 + 3 * 3 * 2 * 3 * 2, 2, 2**( 2 * 2 ) * 6 - 2**( 2 * 2 ), -( 2 * 2 ) - 2**( 2 * 2 ) + 6 * 2**( 2 * 2 ); $- += 6 + 3; $-; }, do { $- = e 3, 3 * 3 * 6 + 2**( 2 * 2 ), $= - $., 2 + 3 * 1 * 2 * 3 + 2 * 3, 3; $- += e 1 + 3**( 2 * 2 ) + 2**( 2 * 2 ) + 1, 2**6 - 1 + 2 * 3 * 3 + 6 * 3, 3, 2 * 6 * 6 + 6 * 2 + 1, -6 + 2 * 6 + 2 * 6 * 6 + 1; $- += e 1, 1, $,, 6 * 6 - 1, $= + $.; $- += e 6 + 1, $= + $., 1 ^ 1, 2**( 3 + 2 ) + 6 * 3 - 1, 6 * 3 + 2 * 3; $-; }, do { -6 * 2 - 1 + 2**3**2 * 2; }, do { $- = e 1 ^ 1, 1, 3 + 1, -1 + 2 * 3**3 - 1, 2 * 3 * 2; $- += e 6 * 6 + 2 + 2, 2 + 2 + 6 * 6, $,, 1 + 2 * 3 * 2, 3 * 6 + 2; $- += e 6 * 2 + 6 - 1, 6 * 6 + 6 + 2, 1 ^ 1, rand, $= + 1; $- + 1 ^ 1; }
    and the final regex:
    ) =~ m$.{\$a{\$a{\$a{\$=}}}}$g;
    is just:
    =~m/.{3}/g
    essentially the bottom block calls sub e, which generates a string:
    sprintf q|%s%s%s|,$x,q|e|,$y
    (ie the third and fourth arguments with "e" in the middle); this generates:
    0741171151160320971101111161041011140320801011141080321040970991071011 +14044
    which when split into triplets are just ascii codes.
    but of course i could be wrong :)
    a
      (ie the third and fourth arguments with "e" in the middle)

      Yes. I wanted to insert some dummy code that used the other variables but forgot it :^). Now I think it was a good thing because otherwise that code would stand out among the rest. I also wanted to give the code a dollar shape, but didn't (and don't) know how.

      As for the generation of the code, turo, it wasn't automatic. Just search and replace here and there.

      --
      David Serrano

        no automation? ... umm, maybe you're the automated machine :-P
        good obfuscation though!

        cheers

        perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'
Re: Easier than it seems
by turo (Friar) on May 08, 2006 at 12:39 UTC

    is a new ciphering method?, you made it at hand or was another script of yours who made it?

    oh my god! is chaotic!

    perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'