To give a specific example, this Acme::EyeDrops'ed program prints 99 bottles of beer:
Running the above code through perl -MO=Deparse produces:''=~( '(?{' .('`' |'%') .('[' ^ +'-') .('`' |'!') .('`' |',') .'"'. ' +\\$' .'==' .('[' ^'+') .('`' |'/') . +('[' ^'+') .'||' .(';' &'=') .(';' & +'=') .';-' .'-'. '\\$' .'=;' .('[' ^ +'(') .('[' ^'.') .('`' |'"') .('!' ^ +'+') .'_\\{' .'(\\$' .';=('. '\\$=|' ."\|".( '` +'^'.' ).(('`')| '/').').' .'\\"'.+( '{'^'['). ('`'|'"') .(' +`'|'/' ).('['^'/') .('['^'/'). ('`'|',').( '`'|('%')). '\\".\\"'.( '['^ +('(')). '\\"'.('['^ '#').'!!--' .'\\$=.\\"' .('{'^'['). ('`'|'/').( '`'| +"\&").( '{'^"\[").( '`'|"\"").( '`'|"\%").( '`'|"\%").( '['^(')')). '\\" +).\\"'. ('{'^'[').( '`'|"\/").( '`'|"\.").( '{'^"\[").( '['^"\/").( '`'| +"\(").( '`'|"\%").( '{'^"\[").( '['^"\,").( '`'|"\!").( '`'|"\,").( '`'| +(',')). '\\"\\}'.+( '['^"\+").( '['^"\)").( '`'|"\)").( '`'|"\.").( '['^ +('/')). '+_,\\",'.( '{'^('[')). ('\\$;!').( '!'^"\+").( '{'^"\/").( '`'| +"\!").( '`'|"\+").( '`'|"\%").( '{'^"\[").( '`'|"\/").( '`'|"\.").( '`'| +"\%").( '{'^"\[").( '`'|"\$").( '`'|"\/").( '['^"\,").( '`'|('.')). ','. +(('{')^ '[').("\["^ '+').("\`"| '!').("\["^ '(').("\["^ '(').("\{"^ '[') +.("\`"| ')').("\["^ '/').("\{"^ '[').("\`"| '!').("\["^ ')').("\`"| '/') +.("\["^ '.').("\`"| '.').("\`"| '$')."\,".( '!'^('+')). '\\",_,\\"' .'!' +.("\!"^ '+').("\!"^ '+').'\\"'. ('['^',').( '`'|"\(").( '`'|"\)").( '`'| +"\,").( '`'|('%')). '++\\$="})' );$:=('.')^ '~';$~='@'| '(';$^=')'^ '['; +$/='`';
The last four lines above ($: = 'P';...) match your posted code and are just harmless "filler" code, setting a variety of Perl special variables to random values after the eval has already been executed. This filler code is meant to be a "no-op"; its only (cosmetic) purpose is to fully fill all the beer bottles with code. If you don't want the filler code to be inserted, you can set the Acme::EyeDrops FillerVar attribute to '' (see the documentation of FillerVar in the Acme::EyeDrops documentation for the gory details).'' =~ /(?{eval"\$==pop||99;--\$=;sub\n_\{(\$;=(\$=||No).\" bottle\".\" +s\"x!!--\$=.\" of beer\").\" on the wall\"\}print+_,\", \$;!\nTake on +e down, pass it around,\n\",_,\"!\n\n\"while++\$="})/; $: = 'P'; $~ = 'h'; $^ = 'r'; $/ = '`';
If you squint, you'll notice that -MO=Deparse has deparsed the original:
to:$:=('.')^ '~';
which is helpful and all that you'll get from Deparse.$: = 'P';
Update: You could manually do what Corion suggested by editing the Deparse output, just changing eval to print like so:
Running this produces the original source, without the annoying escapes:'' =~ /(?{print"\$==pop||99;--\$=;sub\n_\{(\$;=(\$=||No).\" bottle\".\ +"s\"x!!--\$=.\" of beer\").\" on the wall\"\}print+_,\", \$;!\nTake o +ne down, pass it around,\n\",_,\"!\n\n\"while++\$="})/; $: = 'P'; $~ = 'h'; $^ = 'r'; $/ = '`';
$==pop||99;--$=;sub _{($;=($=||No)." bottle"."s"x!!--$=." of beer")." on the wall"}print+_ +,", $;! Take one down, pass it around, ",_,"! "while++$=
In reply to Re: clean output from Deobfucation
by eyepopslikeamosquito
in thread clean output from Deobfucation
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |