How to run a script, but not let user see code?

Hi,

I want to deploy a (perl) script, in Linux. (Red Hat 7).

Is there a way to protect the script itself from being viewed by the user, but still allow the user to run the script?

I dont want the user to be able to see the source code of the script.

Sort of. You can obfuscate the code making it beyond difficult to read unless you know about Wily Coyote and the guys at CPAN. Check out acme::bleach, acme::buffy, and acme::eye_drops. The last one NOT requiring the acme::eye_drops module to run the obfuscated code. buffy & bleach have to run the Frankenstein code they generated.

Cartoons are always more fun than coding, except when coding creates cartoons....

Hi.

See also pp - PAR Packager - metacpan.org

Note that one option may be very useful:

       -f, --filter=FILTER
           Filter source script(s) with a PAR::Filter subclass.  You may
           specify multiple such filters.

           If you wish to hide the source code from casual prying, this will
           do:

               % pp -f Bleach source.pl

           If you are more serious about hiding your source code, you should
           have a look at Steve Hay's PAR::Filter::Crypto module. Make sure
           you understand the Filter::Crypto caveats!

I have used pp , but not for hiding ... cheers, drl