Perl code encryption

M

Mark

I'm sure many have asked this question before... I don't want my code
to be read by humans for fear of "trade secrets" or proprietary
information being revealed through the code. What I want is a compiler
or encryptor to effectively convert my *.pl files to *.bin or *.exe
files (and I would keep the *.pl safe and distribute the binaries).

In C++ or Fortran, and many other languages, this is a no-brainer
because typically, the source is not distributed and the compiled binary is.

I tried the Perl compiler a year ago and just could not get it to work
on my code which is a collection of my code, CPAN modules, and
third-party licensed software. It may have come a long way since I last
tried it, though.

If you know of an elegant solution to compile or encrypt an executeable
version of my Perl code, could you please share with me this advice?

Mark
 
J

Jeff Stampes

Mark said:
I'm sure many have asked this question before...

Correct. Use the archives or Google.
I don't want my code
to be read by humans for fear of "trade secrets" or proprietary
information being revealed through the code.

Then don't write in perl
What I want is a compiler
or encryptor to effectively convert my *.pl files to *.bin or *.exe
files (and I would keep the *.pl safe and distribute the binaries).

See the FAQ: http://tinyurl.com/3pzsy

~Jeff
 
M

Mark

What I want is a compiler or encryptor to effectively convert my *.pl
Yes, I've read this, but the FAQ doesn't say what the compiler is or how
to use it, unless I missed it twice. I _DID_ however, manage to find
minimal info on using 'perl -MO=Bytecode myprog.pl > myprog.exe'. I
tried running the .exe (after chmod a+x), and got this error: 'Cannot
execute binary file'.

I suppose my follow-up question is how do I, or find info how to,
properly compile a Perl program into an executable?

Mark
 
H

H. Wade Minter

Mark said:
Yes, I've read this, but the FAQ doesn't say what the compiler is or how
to use it, unless I missed it twice. I _DID_ however, manage to find
minimal info on using 'perl -MO=Bytecode myprog.pl > myprog.exe'. I
tried running the .exe (after chmod a+x), and got this error: 'Cannot
execute binary file'.

I suppose my follow-up question is how do I, or find info how to,
properly compile a Perl program into an executable?

The best you'll get at present is PAR (http://par.perl.org/) - a great utility
that will package your Perl code and required modules into a Java JAR-like package,
or a standalone executable. It even has hooks into various filters that will
provide a degree of obsfuscation.

The standard disclaimers apply - even with the filters, it's reasonably trivial to
get to your "proprietary data." But PAR is good stuff.

--Wade
 
T

Tad McClellan

Mark said:
I'm sure many have asked this question before...


So why are you boring everybody with it yet again?

Your Question is Asked Frequently:

perldoc -q hide

How can I hide the source for my Perl program?

You are expected to check the Perl FAQ *before* posting
to the Perl newsgroup.

I don't want my code
to be read by humans for fear of "trade secrets" or proprietary
information being revealed through the code.


Consider choosing some programming language other than Perl then.

What I want is a compiler
or encryptor to effectively convert my *.pl files to *.bin or *.exe


Compiling is NOT encrypting.

Trade secrets can be stolen from compiled code too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,823
Latest member
Nadia88

Latest Threads

Top