On Mon, Dec 01, 2003 at 01:39:43PM -0500 [EMAIL PROTECTED] wrote:
> Can anyone suggest where I might be able to find (hopefully a freeware
> or shareware script..) a program that runs either on a windows system or
> a PERL script that would "encrypt" a perl script by doing such things as
> removing whitespace, etc. so that it is much more difficult to read but
> yet will execute as if "unencrypted"?? I'd like to make the source code
> as difficult to pirate as I can for a program that I'm developing.
Those attempts are usually futile since compiled Perl-code can be
deparsed. Of course, when those pirates you have in mind are a little
retarded, you could use one of those many Acme:: or Acme-alike modules
on the CPAN. I quite like SuperPython. This line transforms any Perl
script into a script that can be run by SuperPython:
perl -ne 's/(.)/" " x ord($1)."\t"/ge; print' script.pl > script.spy
And in order to execute it, either do a
perl -MSuperPython script.spy
or add 'use SuperPython;' on top of the encrypted script.
But note that
perl -MO=Deparse -MSuperPython script.spy
would for instance yield
BEGIN { $^W = 1; }
use SuperPython;
my $code = sub {
my $arg1 = shift @_;
sub {
$arg1 + shift(@_);
}
;
}
;
print &$code(5)->(6);
which could easily be more readable than the original script was.
Tassilo
--
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]