-1

Possible Duplicates:
How can I obfuscate my Perl script to make it difficult to reverse engineer?
Is there a good obfuscater for Perl code?

Have some Perl code I'd like to resell, but don't want the code to be viewable, just executable.

Is there a way to "secure" the code and if so, what would be the requirements to do this, risks related to it in terms of how easy it'd be to reverse engineer and possible effects on run-time.

Community
  • 1
  • 1
blunders
  • 3,619
  • 10
  • 43
  • 65
  • Also dupe of http://stackoverflow.com/questions/1237286/how-can-i-compile-my-perl-script-so-it-can-be-executed-on-systems-without-perl-in – Ether Mar 11 '11 at 20:31

2 Answers2

2

There is no sure-fire way. A determined attacker can always find some version of the source.

That said, Acme::Bleach makes it more difficult.

The first time you run a program under use Acme::Bleach, the module removes all the unsightly printable characters from your source file. The code continues to work exactly as it did before, but now it looks like this:

 use Acme::Bleach;
Community
  • 1
  • 1
Tim
  • 13,904
  • 10
  • 69
  • 101
-2

The only way to do this is to compile it to machine code, unfortunately this isn't possible for perl. See Edit

You could alternately obfuscate the code to protect it, although its not too difficult to de-obfuscate the code. Check out http://www.stunnix.com/prod/po/overview.shtml or google for "perl code obfuscator" for some more information on hiding your code.

Edit: It appears I'm wrong, see comments for perl compilers that will make machine code. (Should be as safe as distributing a C program)

Cody
  • 3,734
  • 2
  • 24
  • 29