There are no options besides obfuscation. Consider the following:
1. perlcc to compiled code doesn't work for compiling to C for most of code (and generates 5-10Mb of C code that compiles for 10 minutes by gcc) and result doesn't work almost all of the time. Output of 'perlcc -B' can be reversed using B::Deparse..
2. ActiveState PerlApp just extracts all your project's files to a temporary directory during execution of your "compiled" code. Just copy them from there, with all comments and documentation. Simply LOL. Why nobody is sueing ActiveState for this?
3. Using PAR even with --filter option produces rather readable code, that doesn't work most of the time for real projects.
4. Using perl2exe is questionable due to existnance of exe2perl (search on google for it). If it won't work for current version of perl2exe, memory dump of running process should do the trick and one will get cleartext of your scripts with comments and everything.
The only reliable and unreversable solution is the use of obfuscator - like Stunnix Perl-Obfus.
Obfuscators replace names of variables and functions (and other names like names of file handles) with some
random-generated identifiers (this is one-way function, it can't be reversed), also removing comments, white spaces and replacing strings and integers with expressions or their uglified versions.
So, definitely there is a demand for obfuscation (perhaps due to a rise of scripting languages compared to compiled ones)..
Some commercial tools for unix (written in C) are also distributed in obfuscated source form, along with Makefiles to built with - for example
Gimpel Software's FlexeLint for C/C++.
Lucky PHP guys..
Too bad that support for compiling Perl code into executables is almost non-working..
The only viable alternative I know of is using Stunnix Perl-Obfus for obfuscation/scrambling, and turning output into executable with PAR or Perl2Exe. Does anybody knows a better alternative?
BTW, writing web servers in scripting languages has a lot of advantages - it allows to make them very portable. The commercial Stunnix Perl Web Server, for example, is even positioned as a framework for browser-based applications - i.e. user runs the wrapper script that starts web server on free port, and browser window is opened with dynamic web site served by that local web server. The performance and latency provided by that Stunnix Perl Web Server is very nice (a lot of tricks are made, even mod_perl like framework for fast CGI execution), and the resulting app is portable accross Windows, MacOS X and any UNIX. It's even possible to pack everything - site, wrapper script, web server plus perl interpreter and all dependent Perl modules into standalone executable (they have demos on their site).
It would be nice to have such advanced thing for Python and PHP.
BTW, I found Stunnix
Perl Web Server to be a nice foundation for cross-platform
browser-based applications in Perl - it's
advanced web server written in Perl aiming at providing smallest
response latency possible, that can be packed along with perl-driven
dynamic site itself into standalone executable that includes Perl
interpreter (that, when run, will start web server on free port and open
browser window with the site). Real alternative to Gtk and Qt, IMHO -
at least for simple apps.
1. perlcc to compiled code doesn't work for compiling to C for most of code (and generates 5-10Mb of C code that compiles for 10 minutes by gcc) and result doesn't work almost all of the time. Output of 'perlcc -B' can be reversed using B::Deparse..
2. ActiveState PerlApp just extracts all your project's files to a temporary directory during execution of your "compiled" code. Just copy them from there, with all comments and documentation. Simply LOL. Why nobody is sueing ActiveState for this?
3. Using PAR even with --filter option produces rather readable code, that doesn't work most of the time for real projects.
4. Using perl2exe is questionable due to existnance of exe2perl (search on google for it). If it won't work for current version of perl2exe, memory dump of running process should do the trick and one will get cleartext of your scripts with comments and everything.
The only reliable and unreversable solution is the use of obfuscator - like Stunnix Perl-Obfus. Obfuscators replace names of variables and functions (and other names like names of file handles) with some random-generated identifiers (this is one-way function, it can't be reversed), also removing comments, white spaces and replacing strings and integers with expressions or their uglified versions.
Just use obfuscators for renaming symbols in your code, there is no other way.
.. or use a commercial Stunnix Perl-Obfus - obfuscator and encoder for Perl - instead.
For example, Stunnix sells Perl Obfuscator, JavaScript Obfuscator, C/C++ Obfuscator and VBScript Obfuscator. They have one more product though - Perl Web Server.
So, definitely there is a demand for obfuscation (perhaps due to a rise of scripting languages compared to compiled ones)..
Some commercial tools for unix (written in C) are also distributed in obfuscated source form, along with Makefiles to built with - for example Gimpel Software's FlexeLint for C/C++.
Lucky PHP guys.. Too bad that support for compiling Perl code into executables is almost non-working.. The only viable alternative I know of is using Stunnix Perl-Obfus for obfuscation/scrambling, and turning output into executable with PAR or Perl2Exe. Does anybody knows a better alternative?
It would be nice to have such advanced thing for Python and PHP.
BTW, I found Stunnix Perl Web Server to be a nice foundation for cross-platform browser-based applications in Perl - it's advanced web server written in Perl aiming at providing smallest response latency possible, that can be packed along with perl-driven dynamic site itself into standalone executable that includes Perl interpreter (that, when run, will start web server on free port and open browser window with the site). Real alternative to Gtk and Qt, IMHO - at least for simple apps.
BTW does anybody know similar thing for PHP? I hope PHP as a platform catches with Perl at least in this field.. The idea is very slick.
There is a similar thing for ASP: IISemulator, though without that advanced "pack into .exe" and cross-platformness..