Pyarmor is a command line tool used to import or run encrypted python scripts. Only by a few extra files, pyarmor can run and imported encrypted files in the normal python environments. Here are the basic steps:
- Generate project capsule
- Encrypt python scripts with project capsule
- Copy project capsule and encrypted scripts to runtime environments.
Pyarmor just likes an enhancement which let python could run or import encrypted files.
- Run encrypted script or import encrypted module
- Run or import encrypted compiled python files (.pyc, .pyo)
- Mixed encrypted files with normal python files.
- Expire encrypted files
- Bind encrypted files to harddisk
-
Python 2.5, 2.6, 2.7 and Python3
-
Prebuilt Platform: win32, win_amd64, linux_i386, linux_x86_64
Got prebuilt library platforms.zip, then extract it to src of Pyarmor
The core of [Pyarmor] is written by C, the only dependency is libc. So it's not difficult to build for any other platform, even for embeded system. Contact jondy.zhao@gmail.com if you'd like to run encrypted scripts in other platform.
Got source package from pypi
Pyarmor is a command line tool, main script is pyarmor.py. After you got source package, unpack it to any path, then run paramor.py as common python script
python pyarmor.py
Pyarmor is published as shareware. Free trial version that never expires, the limitation is
- Project Capsule generated by trial version is NOT random, but FIXED by hardcode.
A registration code is required to generate random project capsule.
- Personal user: one registration code is enough.
- Company user: one registration code is only used for one project/product.
Click Purchase,
A registration code will be sent to your immediately after payment is completed successfully.
After you receive the email which includes registration code, copy registration code only (no newline), then replace the content of "license.lic" with it.
python pyarmor.py --version
For more information, refer to pyarmor homepage
encrypted files in different path, or in-place
multi --main
mixed encrypted and common files encrypted main script import plain and encrypted python module plain main script import plain and encrypted python module
encrypted pyc/pyo file
expired encrypted files
bind to machine
bind to machine with expired date
bind to fix files
- Use ctypes load core library other than python extentions which need built for each python version.
- "_main_" block not running in encrypted script.
- Avoid source code got by c debugger.
- Change default outoupt path to "build" in command "encrypt"
- Change option "--bind" to "--bind-disk" in command "license"
- Document usages in details
Any question feel free to contact jondy.zhao@gmail.com