A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.
Project description
Pyarmor is a command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts. It protects Python scripts by the following ways:
Obfuscate code object to protect constants and literal strings.
Obfuscate byte code of each code object in runtime.
Clear f_locals of frame as soon as code object completed execution.
Expired obfuscated scripts, or bind to fixed machine.
Look at what happened after foo.py is obfuscated by Pyarmor. Here are the files list in the output path dist:
foo.py pytransform.py _pytransform.so, or _pytransform.dll in Windows, or _pytransform.dylib in MacOS pyshield.key pyshield.lic product.key license.lic
dist/foo.py is obfuscated script, the content is:
from pytransfrom import pyarmor_runtime pyarmor_runtime() __pyarmor__(__name__, __file__, b'\x06\x0f...', 1)
All the other extra files called Runtime Files, which are required to run or import obfuscated scripts. So long as runtime files are in any Python path, obfuscated script dist/foo.py can be used as normal Python script.
The original python scripts can be replaced with obfuscated scripts seamlessly.
For details to visit protect-python-scripts-by-pyarmor.md
Support Platforms
Python 2.5, 2.6, 2.7 and Python3
win32, win_amd64, linux_i386, linux_x86_64, macosx_x86_64
Embedded Platform: Raspberry Pi, Banana Pi, TS-4600 / TS-7600
Quick Start
Install:
pip install pyarmor
Obfuscate scripts:
python pyarmor.py obfuscate --src=examples/simple --entry=queens.py
Run obfuscated scripts:
cd dist python queens.py
Generate an expired license and run obfuscated scripts with new license:
python pyarmor.py licenses --expired 2018-12-31 Customer-Jondy cp licenses/Customer-Jondy/license.lic dist/ cd dist/ python queens.py
There is a webui used to obfuscate script in gui mode. Start it:
pyarmor-webui
Note that the webui doesn’t include all the features of Pyarmor, it can help you to understand Pyarmor quickly.
More Resources
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pyarmor-4.3.2-py2.py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1f269d394e8fbc3395d64a79209508b064cfffb15a2f0fa960413c83ea35f78 |
|
MD5 | aef4337f8681a303c88c714a8737d99b |
|
BLAKE2b-256 | 04fdfbe1b67f5bdd91076b01131b3eef72ca1636f335edc8586c0da8dbab0a05 |
Hashes for pyarmor-4.3.2-py2.py3-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5bb535d6eec71061bb2ef33a50540c8bda3873746d7a7865db457491f3e5dfe |
|
MD5 | 99c7ba2b113127d1af0e6e05503ee455 |
|
BLAKE2b-256 | 8b051b99da01f5efed2d64e672516a5bc5e24a571b9ebe8b4400497175a77a53 |
Hashes for pyarmor-4.3.2-py2.py3-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b00f5d7b040f3b5bb7ad1eaa440d9f383c2b93df58eff4596096c78f6e9d7b0c |
|
MD5 | a6643294a153e16d719e53921b1ea632 |
|
BLAKE2b-256 | c1c7f6ff397c780d7d85ec5eee56c9eb749f4f23d8f1254b59df2fe739673994 |
Hashes for pyarmor-4.3.2-py2.py3-none-macosx_10_11_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e86540ede869dd5fbfcb5fc0988548eb6283e16ddc5b90ee753b572aaf7996e1 |
|
MD5 | 1cfa36dd28ac784043dc3f4ce272c15a |
|
BLAKE2b-256 | b9078fa16882f26870e541d03fa895ac6a065d5c7e70191c5a3fcfc0e031e54a |
Hashes for pyarmor-4.3.2-py2.py3-none-macosx_10_11_intel.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd99cd894bd47393115d02a32c4b29c21ed5e456af6042f54d75bcb85b273a0c |
|
MD5 | ed15d73839965b58fcea9b611e67cbae |
|
BLAKE2b-256 | 71a7c62fe7a3968bf50c7eeee73f7485ffdfd8e0310637dd3ecbfe3e55f13d84 |
Hashes for pyarmor-4.3.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 087d1a20ebc299ad7534135babf2a58fb7b3db35fd20244af9d2537d9a2b5227 |
|
MD5 | bfbec85214b2f286e0bd0b21190cf114 |
|
BLAKE2b-256 | c646c602a4e327f8f02a6f8753ebd09405e3135f6b24619e882b24a996ff918a |