Skip to main content

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 co_code of each function (code object) in runtime.

  • Clear f_locals of frame as soon as code object completed execution.

  • Verify the license file of obfuscated scripts while running it.

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:

pyarmor obfuscate examples/simple/queens.py

Run obfuscated scripts:

cd dist
python queens.py

Pack obfuscated scripts with PyInstaller, py2exe, cx_Freeze etc.:

pip install pyinstaller
pyarmor pack examples/py2exe/hello.py

Generate an expired license and run obfuscated scripts with new license:

pyarmor licenses --expired 2018-12-31 Customer-Jondy
cp licenses/Customer-Jondy/license.lic dist/

cd dist/
python queens.py

Start webui, open web page in browser for basic usage of Pyarmor:

pyarmor-webui

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

pyarmor-4.4.1.zip (1.3 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyarmor-4.4.1-py2.py3-none-win_amd64.whl (1.3 MB view details)

Uploaded Python 2Python 3Windows x86-64

pyarmor-4.4.1-py2.py3-none-win32.whl (1.3 MB view details)

Uploaded Python 2Python 3Windows x86

pyarmor-4.4.1-py2.py3-none-manylinux1_x86_64.whl (1.3 MB view details)

Uploaded Python 2Python 3

pyarmor-4.4.1-py2.py3-none-macosx_10_11_x86_64.whl (1.3 MB view details)

Uploaded Python 2Python 3macOS 10.11+ x86-64

pyarmor-4.4.1-py2.py3-none-macosx_10_11_intel.whl (1.3 MB view details)

Uploaded Python 2Python 3macOS 10.11+ Intel (x86-64, i386)

pyarmor-4.4.1-py2.py3-none-any.whl (1.3 MB view details)

Uploaded Python 2Python 3

File details

Details for the file pyarmor-4.4.1.zip.

File metadata

  • Download URL: pyarmor-4.4.1.zip
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.8.1 setuptools/2.1 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/3.4.2

File hashes

Hashes for pyarmor-4.4.1.zip
Algorithm Hash digest
SHA256 ccdebf84cd2fb0da92f3166cf43cb558b636b32145e6005312a1be3a0b1b61e6
MD5 56b175fb2c3b7d913cd0b940d8b3448b
BLAKE2b-256 79c857e1367ab5a97bfa98e9c63bf30581311227abab7c447061b3a49de77a63

See more details on using hashes here.

File details

Details for the file pyarmor-4.4.1-py2.py3-none-win_amd64.whl.

File metadata

  • Download URL: pyarmor-4.4.1-py2.py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 2, Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.8.1 setuptools/2.1 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/3.4.2

File hashes

Hashes for pyarmor-4.4.1-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 00375f97cc39e65ccefdcc8d7c67a9968945d9d2bace9dbcbbb2a9fe32ce73cd
MD5 0e706f3a8e34b9be2702beec18360894
BLAKE2b-256 e5725a6168c0a4a4e3efaa4a983fea098aef185763fc85a8ce3929ac2bc67299

See more details on using hashes here.

File details

Details for the file pyarmor-4.4.1-py2.py3-none-win32.whl.

File metadata

  • Download URL: pyarmor-4.4.1-py2.py3-none-win32.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 2, Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.8.1 setuptools/2.1 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/3.4.2

File hashes

Hashes for pyarmor-4.4.1-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 df4747a02177ad12fc4014792c81253e9c7658a7fd3361fc7898faaee716b821
MD5 0accd496f1614dd272d49297c73f2b67
BLAKE2b-256 70fdf6ed858e8c4454031c737fe1c890c25ef0ad9ebf0c1e76c282ff387bccef

See more details on using hashes here.

File details

Details for the file pyarmor-4.4.1-py2.py3-none-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyarmor-4.4.1-py2.py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.8.1 setuptools/2.1 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/3.4.2

File hashes

Hashes for pyarmor-4.4.1-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a0b743d799b8bcd753056526cc418da028244691e62c92c2d842d0f151a9693e
MD5 3771c287e0f3a0599077e0498c0135f2
BLAKE2b-256 58942c8552a1a71ed7b1edaf649c5634492c8a6554b8cf1b9282b00fc7fa62ee

See more details on using hashes here.

File details

Details for the file pyarmor-4.4.1-py2.py3-none-macosx_10_11_x86_64.whl.

File metadata

  • Download URL: pyarmor-4.4.1-py2.py3-none-macosx_10_11_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 2, Python 3, macOS 10.11+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.8.1 setuptools/2.1 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/3.4.2

File hashes

Hashes for pyarmor-4.4.1-py2.py3-none-macosx_10_11_x86_64.whl
Algorithm Hash digest
SHA256 0beab2e95db6b9677d55797ff19723318fbbbf9527c12e60bac533afc7210c28
MD5 416cc3f0e3a7c3cb3b8cf567d5559d4f
BLAKE2b-256 c8ad9138f1e37b2185dd750454ba733d93e8f27cf2de644bca1127c7d1451455

See more details on using hashes here.

File details

Details for the file pyarmor-4.4.1-py2.py3-none-macosx_10_11_intel.whl.

File metadata

  • Download URL: pyarmor-4.4.1-py2.py3-none-macosx_10_11_intel.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 2, Python 3, macOS 10.11+ Intel (x86-64, i386)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.8.1 setuptools/2.1 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/3.4.2

File hashes

Hashes for pyarmor-4.4.1-py2.py3-none-macosx_10_11_intel.whl
Algorithm Hash digest
SHA256 1a5a78dbbeeace8dc0b75953cb9d333a83a8a754a89b518e61dd4e495ccce224
MD5 b9de561ce8a4b6509c959d5392466be6
BLAKE2b-256 72cb04244c755f1d5b731d5a739b8574141758bcd17546e2cbd07711fe95e09c

See more details on using hashes here.

File details

Details for the file pyarmor-4.4.1-py2.py3-none-any.whl.

File metadata

  • Download URL: pyarmor-4.4.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.8.1 setuptools/2.1 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/3.4.2

File hashes

Hashes for pyarmor-4.4.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1f03fd4bb195113bf4681f4dfd24de9efa2a779afe9c45e5e6517188e768339d
MD5 7412e0ec9c5f3fc3d88b2a187329f6c7
BLAKE2b-256 5353ecb9f2bc45442018c8d5804d25add6fd24dacea451c771b5f7075f1cec57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page