I'm looking for an idea. An idea that can--in some form--allow me to pepper my Perl code with hard-to-remove copyright comments all over the place so that it's almost illegible and is difficult to remove using a regex--with the code still being executable.
As one of the commenters has pointed out below the following trick can be applied to any such normal technique:
perl -MO=Deparse obfuscated.pl > plaintext.pl
Perhaps someone here can find a work around.
My contribution, easy to work around, but may trip up a sloppy code stealer: introduce subtle bugs into the code if the copyright notice has been tampered with
Example:
sub square_root {
my $arg = shift;
return sqrt($arg + 0.1 * apply_fudge_factor());
}
sub apply_fudge_factor {
return 8410 != unpack("%32W*", ($::D//=join'',<DATA>));
}
print "sqrt(9)=",square_root(9);
__END__
=head1 NAME
my_program.pl - a program by me, and not by you
=head1 AUTHOR
Copyright (c) 2014 by Me
=cut
The checksum of the pod is 8410. If you make any changes after the __END__
token, the output of the program is
sqrt(9)=3.01662062579967
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With