Falldog / pyconcrete

Protect your python script, encrypt it as .pye and decrypt when import it
Apache License 2.0
692 stars 149 forks source link
obfuscate obfuscation protection python python-encryption python-library

pyconcrete

Travis AppVeyor PyPI Version PyPI PyVersion PyPI License

Protect your python script, encrypt .pyc to .pye and decrypt when import it


Protect python script work flow

Encryption

Installation

pip

You must set up environment variable PYCONCRETE_PASSPHRASE for installation continuously.

$ PYCONCRETE_PASSPHRASE=<your passphrase here> pip install pyconcrete

or, if you use an old pip version that supports --egg:

$ pip install pyconcrete --egg --install-option="--passphrase=<your passphrase>"

pyconcrete installed as egg, if you want to uninstall pyconcrete will need to manually delete pyconcrete.pth.

source

Usage

Full encrypted

pyconcrete main.pye
src/*.pye  # your libs

Partial encrypted (pyconcrete as lib)

Test

Example

Django with pyconcrete

Building on Linux

Python 3.7 - fix Ubuntu 14.04 build error

x86_64-linux-gnu-gcc: error: unrecognized command line option `-fstack-protector-strong`

Reference by Stackoverflow solution

Building on Windows

Python 2.7 - Visual Studio 2008

https://www.microsoft.com/en-us/download/details.aspx?id=44266

Python 3.5, 3.6, 3.7 - Visual Studio 2015

MSVC 2015 Build Tools

Document

Reference

https://matthew-brett.github.io/pydagogue/python_msvc.html https://github.com/cython/cython/wiki/CythonExtensionsOnWindows

Announcement

pyconcrete is an experimental project, there is always a way to decrypt .pye files, but pyconcrete just make it harder.