http://www.perlmonks.org?node_id=1228277


in reply to Re^2: Encrypting source code :(
in thread Encrypting source code :(

Offhand, I can think of 2 other possibilities:

Use pp to create the executable without encryption, then encrypt the result. To run the program, create a program or script that decrypts the encrypted executable, runs it, then cleans up.

If there is an acceptable Perl installation on the target system, use pp to create a PAR file, then encrypt the PAR file. In that case, create a program to decrypt the PAR file, run it. then clean up.

Replies are listed 'Best First'.
Re^4: Encrypting source code :(
by bliako (Priest) on Jan 10, 2019 at 12:21 UTC

    Thanks RonW, I finally resorted to something like this but with my own 'PAR' which is basically a tar file with encrypted modules, which are decrypted in memory and eval'ed

    UPDATE: some discussion on module eval'ing regarding this issue: use of already eval()ed module (from string)