A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.
Pyarmor is a command-line tool designed for obfuscating Python scripts, binding obfuscated scripts to specific machines, and setting expiration dates for obfuscated scripts.
.py
files, allowing them to seamlessly replace the original Python scripts in most cases.For more information, check out the Pyarmor Environments.
[^1]: Some features may be exclusive to Python 3. [^2]: Some features may be exclusive to specific architectures.
pip install pyarmor
foo.py
script:pyarmor gen foo.py
This command generates an obfuscated script like this at dist/foo.py
:
from pyarmor_runtime import __pyarmor__
__pyarmor__(__name__, __file__, b'\x28\x83\x20\x58....')
python dist/foo.py
For more information, check out the getting started tutorial.
Pyarmor is published as shareware. The free trial version never expires, but has some limitations.
Refer to Pyarmor licenses for information on license types, features, limitations, and purchasing a Pyarmor license.
Please read the Pyarmor EULA.
中文资源
Pyarmor 8.0 introduces significant changes. It has been rewritten and new features are implemented through the new commands:
gen
, reg
, cfg
. These commands only work for Python 3.7 and above.
Users of versions prior to 8.0 should read the Import Notes section to decide whether to upgrade Pyarmor.
Each major version comes with a separate changelog file, detailing fixed issues, new features, and compatibility issues between different versions.
Make sure to read the changelog carefully before upgrading Pyarmor:
Full changelogs at releases
Upcoming features at Pyarmor 8.x Release Plan
Going forward, only bug fixes will be provided for older commands, such as obfuscate
and licenses
.
No new features will be added to these commands, but they will continue to be usable.
Upon the release of Pyarmor 8.0, there are three scenarios for existing users:
SPP mode will not work
pyarmor register
command without arguments returns a 404
error
pyarmor -v
to ensure you are not using a trial version.Registering Pyarmor with pyarmor register pyarmor-regcode-xxxxxx.txt
is limited to 10 uses:
Downloading "pyarmor-regfile-xxxxxx.zip" once, use this `.zip` file to register Pyarmor later.
By default, the pyarmor
command only accepts the new commands.
To continue using older commands like obfuscate
and licenses
, you can:
pyarmor-7
instead of pyarmor
PYARMOR_CLI=7
and continue using pyarmor
pyarmor.pyarmor:main_entry
in any other wayNew EULA:
License Upgrades:
Internet Connection:
Python Version Support: