Skip to main content

A tool used to run or import obfuscated python scritps

Project description

Pyarmor is a command line tool used to import or run obfuscated python scripts. Only by a few extra files, pyarmor can run and imported obfuscated files in the normal python environments.

Pyarmor just likes an enhancement by which python could run or import obfuscated scripts.

Main Features

  • Run obfuscated script or import obfuscated module

  • Expire obfuscated files

  • Bind obfuscated files to harddisk, mac address, ip address etc.

Support Platforms

  • Python 2.5, 2.6, 2.7 and Python3

  • Prebuilt Platform: win32, win_amd64, linux_i386, linux_x86_64, darwin_x86_64

  • Embeded Platform: Raspberry Pi, Banana Pi, TS-4600 / TS-7600

Installation

The simple way is pip:

pip install pyarmor

Or get source package from pypi/pyarmor

Pyarmor is a command line tool, main script is pyarmor.py. After you get source package, unpack it to any path, then run paramor.py as common python script:

python pyarmor.py

If Pyarmor is installed by pip, there is a command will be avaiable in Python script path:

pyarmor

Basic Usage

The following examples show how to obfuscate a python package pybench, which locates in the examples/pybench in the source of pyarmor.

Obfuscate package pybench:

python pyarmor.py obfuscate --src examples/pybench --entry pybench.py \
                            "*.py" "package/*.py"

# Note that quotation mark is required for file patterns, otherwise
# it will be expanded base on current path by shell.
#
# This command will create a extra file .pyarmor_capsule.zip in the
# --src path, and save all the obfuscated scripts to default output
# path "dist" in the current path
#
cd dist

# Check obfuscated script
cat pybench.py

# Run obfuscated script
python pybench.py

Use project to manage obfuscated scripts:

mkdir projects
python pyarmor.py init --src examples/pybench --entry pybench.py \
                       projects/pybench

# This command will create 2 files: .pyarmor_config, .pyarmor_capsule.zip
# in the project path "projects/pybench"
cd projects/pybench

# And there is a shell script "pyarmor" is created at the same time.
# (In windows, the name is "pyarmor.bat")
#
# Now run command "build" to obfuscated all the scripts
#
./pyarmor build

# Check obfuscated script
cd dist
cat pybench.py

# Run obfuscated script
python pybench.py

Start a webui to manage project:

# For windows
webui/manager.bat

# For linux
webui/manager.sh

# If Pyarmor is installed by pip
pyarmor-webui

Here is online demo Pyarmor Demo

More usage, refer to user-guide.md in the source package.

How to obfuscate python scripts by Pyarmor, refer to mechanism.md in the source package.

For more information, refer to Pyarmor Homepage

Project details


Release history Release notifications | RSS feed

This version

3.8.9

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyarmor-3.8.9.zip (1.3 MB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 2Python 3

File details

Details for the file pyarmor-3.8.9.zip.

File metadata

  • Download URL: pyarmor-3.8.9.zip
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyarmor-3.8.9.zip
Algorithm Hash digest
SHA256 bd64190663ed9de59ebb6c836b6adc41e73ede8e45140d25cca1f60e277a4162
MD5 efd7c7018274103ebecd27738f508bf7
BLAKE2b-256 97061d68e0ecf4c4645f47460ff563f8a167eb236086040226dfcc566a9f4899

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyarmor-3.8.9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9e11bb648557dc58417bcbdba30c114e3d06d804407b35dbf6d6c757b5e8e73d
MD5 ff3c522fdbe9ad959dc17e7504a51372
BLAKE2b-256 d59927bf0d8e66634e482fdb5ce8969a7bdc56bb23919d3ab0c61f2fa99a05d1

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