#!/usr/bin/perl use warnings; use strict; use feature 'say'; use File::Slurp; use B::Deparse; # first trial without safe my $japh = read_file( 'toy1.pl' ) ; say "japh is $japh"; eval($japh); # second trial with safe and copy/paste my $deparse = B::Deparse->new(); my $body = $deparse->coderef2text(sub { my $name = 'Donald Trump'; $name =~ s/ / "in the sub" /; say "name is $name"; }); say "second trial is $body"; # third trial combines two methods my $deparse2 = B::Deparse->new(); my $body2 = $deparse2->coderef2text(sub { my $japh2 = read_file( 'toy1.pl' ) ; say "japh2 is $japh2"; eval($japh2); }); say "third trial is $body2"; # 4th trial uses backticks my $file = 'toy1.pl'; my $command = "perl -MO=Deparse $file"; say "command is $command"; my $output = `$command`; say "4th trial is $output"; # 5th trial looks at original obfu $file = 'obfu3.pl'; $command = "perl -MO=Deparse $file"; $output = `$command`; say "5th trial is $output"; #### japh is #!/usr/bin/perl use Modern::Perl qw/2010/; my $name = 'Donald Trump'; $name =~ s/ / "Perl is great" /; say "name is $name"; name is Donald "Perl is great" Trump second trial ia { use warnings; use strict; use feature 'say'; my $name = 'Donald Trump'; $name =~ s/ / "in the sub" /; say "name is $name"; } third trial is { use warnings; use strict; use feature 'say'; my $japh2 = read_file('toy1.pl'); say "japh2 is $japh2"; eval $japh2; } command is perl -MO=Deparse toy1.pl toy1.pl syntax OK 4th trial is use Modern::Perl ('2010'); use warnings; use strict; use feature 'say', 'state', 'switch'; my $name = 'Donald Trump'; $name =~ s/ / "Perl is great" /; say "name is $name"; obfu3.pl syntax OK 5th trial is $= = $'; $. | $| unless $; $_ = '*$(^@(%_+&~~;#~~/.~~;_);;.);;#);~~~~;_,.~~,.*+,./|~~;_);@-,.;.);~~,./@@-__ );;.);;#,.;.~~@-);;#);;;);~~,.*+,.;#);;;;#-(@-__);;.);;#,.;.~~@-););,./.);~~,./| ,.*+,./|,.););;#;#-(@-__);;.);;#,.;.~~@-;;,.,.*+,./@,.;.;#__;#__;;,.,.*+,./|,.;; ;#-(@-__@-__,.;_);@-,.;.,./|~~();.;#;.;;;;;;;;;.;.~~;.~~~~/@~~@-~~~~;#/|;#/|~~~~ ~~/@~~@-~~~~~~;_,.;;,.;.);,.~~;_,./|);;.,./@,./@~~~~~~*+;#-(@-__,.,.,.*+,./|,.;; ~~()~~@-);;#);;.,.~~~~@-);-(@-__@-*+);~~,..%,.;;,.*+);~~~~@-,.*+,.,.~~@-~~.%,.;; ~~@-,./.,./|,.;;~~@-~~.%););;#-(@-__@-*+);;.,./|,./@,.*+,./|,.-(~~@-,.*+,.,.~~@- ~~.%,.,.~~@-,./.,./|,.;;~~@-~~.%););;#-(@-__);.%~~/@~~@-~~~~~~;_,.(),.;_,..%,.;. ~~;_~~;;;#/|~~~~~~*+;#-(@-__);@-);~~,.*+,./|);;;~~@-~~~~;;__;;/.;.@-;;();./@,./| ~~~~;#-(@-__&$#%^'; $__ = ' '; use arybase (); $___ = '````' | "$[`$[" | '`%",'; $~ = ("$___$__-$[``$__" | "$___" | "$___$__-$[.%") . (q['`] | "'$[" | q['#]) . ' /.*?&([^&]*)&.*/$' . ++$= . ('/``' | "/$[`" | q[/#']) . (";`/[\\`\\`$__]//`;" | ";$[/[\\$[\\`$__]//`;" | ";#/[\\\$\\.$__]//'") . '@:=("@-","/.","~~",";#",";;"," ;.",",.",");","()","*+","__","-(","/@",".%","/|",";_");@:{@:}=$%..$#:;' . ('`' | "$[" | '#') . '/(..)(..)/' . ('```' | "``$[" | '#("') . '(($:{$' . $= . '}<<' . (++$= + $=) . ')|($:{$' . $= . '}))/' . ('```;' | "``$[;" | q[%'#;]) . ("````'$ __" | "%$[``" | '%&!,') . ${$[;}; `$~$__>&$=`;