Pyarmor

A command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.

Quick Start

Seamless Replacement

The obfuscated script is a normal python script. With an extra extension module pytransform, the plain Python scripts can be replaced with obfuscated ones seamlessly

And Pyarmor works well with py2exe, py2app, PyInstaller, cx_Freeze etc.

Runtime Obfuscation

The byte code of each code object will be obfuscated as soon as code object completed execution, and f_locals of frame is cleared at the same time


Irreversible Obfuscation Modes

RFT Mode

Renames functions, methods, classes, variables, and arguments

BCC Mode

Converts some Python functions to C functions and compiles them into machine instructions using high optimization options for irreversible obfuscation

Pack Obfuscated Scripts

Pyarmor could pack obfuscated scripts into one bundle with PyInstaller

Different Licenses

Expire obfuscated scripts

Pyarmor can set expired date for obfuscated scripts. After that, obfuscated scripts can not be run

Bind to fixed machine

Pyarmor can bind obfuscated scripts to serial number of harddisk, mac address of network card, ip address etc..

Extend other license type

The obfuscated script is black box for end user, add any authentation code in your Python script

Supported Platforms

More information

Windows

Linux

MacOS

Embedded System

Quick Start

Install Pyarmor

The easy way is by pip

pip install pyarmor
Obfuscate Scripts

Obfuscate script foo.py and all the other .py files in the current path, save all the obfuscated scripts to folder dist

pyarmor gen foo.py
Run Obfuscated Scripts

Run obfuscated script dist/foo.py as normal Python script

cd dist
python foo.py
WebUI

It will start a light weight web server in localhost, and open a page in web browser(snapshots).

pip install pyarmor-webui
pyarmor-webui

Learn more enter tutorial