Man Page¶
PyArmor is a command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.
The syntax of the pyarmor
command is:
pyarmor <command> [options]
The most commonly used pyarmor commands are:
obfuscate Obfuscate python scripts
licenses Generate new licenses for obfuscated scripts
pack Pack obfuscated scripts to one bundle
hdinfo Show hardware information
See pyarmor <command> -h for more information on a specific command.
obfuscate¶
Obfuscate python scripts.
SYNOPSIS:
pyarmor obfuscate <options> SCRIPT...
DESCRIPTION
PyArmor first checks whether .pyarmor_capsule.zip
exists in
the HOME
path. If not, make it.
Then search all the .py files in the path of entry script, and obfuscate them in the default output path dist.
Next generate default license.lic
for obfuscated scripts and
make all the other Runtime Files in the dist path.
Finally insert Bootstrap Code into each entry script.
OPTIONS
-O PATH, --output PATH | |
Output path | |
-r, --recursive | |
Match files recursively | |
--capsule CAPSULE | |
Use this capsule to obfuscate scripts |
licenses¶
Generate new licenses for obfuscated scripts.
SYNOPSIS:
pyarmor licenses <options> CODE
OPTIONS:
-C CAPSULE, --capsule CAPSULE | |
Use this capsule to generate new licenses | |
-O OUTPUT, --output OUTPUT | |
Output path | |
-e YYYY-MM-DD, --expired YYYY-MM-DD | |
Expired date for this license | |
-d SN, --bind-disk SN | |
Bind license to serial number of harddisk | |
-4 IPV4, --bind-ipv4 IPV4 | |
Bind license to ipv4 addr | |
-m MACADDR, --bind-mac MACADDR | |
Bind license to mac addr |
pack¶
Obfuscate the scripts and pack them into one bundle.
SYNOPSIS:
pyarmor pack <options> SCRIPT
OPTIONS:
-t TYPE, --type TYPE | |
cx_Freeze, py2exe, py2app, PyInstaller(default). | |
-O OUTPUT, --output OUTPUT | |
Directory to put final built distributions in. |
hdinfo¶
Show hardware information of this machine, such as serial number of hard disk, mac address of network card etc. The information got here could be as input data to generate license file for obfuscated scripts.
SYNOPSIS:
pyarmor hdinfo