Download the PHP package pelock/python-obfuscator without Composer

On this page you can find all versions of the php package pelock/python-obfuscator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package python-obfuscator

Python Obfuscator — Obfuscate, Virtualize & Protect Python Code

Python Obfuscator is a tool to obfuscate, virtualize & protect Python .py scripts against reverse engineering with a VM engine (or finite-state automata machine), self-defending integrity checks, polymorphic string encryption, anti-debugging, anti-vm, anti-emulation and 50+ total obfuscation strategies!

It's available for Windows & Linux, plus VSCode/Cursor extension:

Multiple programming APIs available:

An online obfuscator interface:

Why Python scripts need obfuscation?

Scripts are typically distributed as plain .py files or bundled inside packages. That convenience means anyone with file access can read the full logic, hunt for credentials or API keys in strings, and steal your algorithms unless you take extra steps to hide intent.

Python is one of the most popular general-purpose scripting languages. It is widely used for automation, backend services, data processing, tooling, and licensing/agent code that customers run on their own machines.

Obfuscation strategies

Python Obfuscator comes with many advanced obfuscation, virtualization & protection strategies. You can easily tune protection versus size and performance.

Python Obfuscation options

Obfuscation Powerful obfuscation

Polymorphic string encryption is the core of the string pipeline: each build generates a fresh decryptor so literals never share one static algorithm. Integers, floats, and decoy noise join that layer. The result conceals literals and structure while preserving tested runtime behaviour.

Processor Code virtualization

Code virtualization is the main control-flow defense. Selected statements are lifted into a randomly generated VM engine (or FSA / flattened dispatcher) with shuffled dispatch tables, decoy opcodes, and an obfuscated dispatcher loop. Analysts must interpret the virtual machine instead of reading plain Python.

Node Finite-state automata (FSA)

Finite-state automata (FSA) obfuscation rewrites linear Python statement blocks into dual-state automata with opaque schedulers and shuffled dispatch handlers. Instead of reading code top to bottom, analysts must follow numeric states, transition tables, and decoy paths to reconstruct the original order.

Bug Anti-debugging

Anti-debugging protection inserts polymorphic probes that detect attached debuggers, tracing hooks, and related host signals, together with anti-VM, anti-sandbox and anti-emulator checks. When a check fires, the obfuscated script exits silently instead of revealing protected logic under interactive analysis.

System monitor Self-integrity checks

Self-defending integrity checks verify that the obfuscated file has not been patched. A bootstrap probe hashes the on-disk script and sets a tamper key when it no longer matches the obfuscated build. String decryptors consume that key, so edited scripts return garbage instead of plaintext.

Brick link Protection linker

The protection linker adds decoy functions and fake calls so a copied fragment still looks like real program code. Hidden traps fire only if someone edits the file or runs a piece of it on its own. When the script starts normally, those extras stay silent and the program runs as usual.

Before and after obfuscation

Look at this example — the same script becomes harder to read at a glance after obfuscation.

Sample Python script before obfuscation

After obfuscation

Obfuscated Python script

Would you still recognise the original intent if you only had the obfuscated text and no prior copy of the script?

How does Python Obfuscator work?

The engine parses Python source into an AST tree, then applies selectable transforms. Code virtualization (VM, FSA, or flattening) rewrites execution so analysts cannot read the script top to bottom. Polymorphic string encryption hides literals; self-defending integrity probes detect patched files. Also available: identifier renaming, numeric encryption, noise and decoy insertion, the protection linker, and anti-debugging checks. Many techniques are specific to this product; some ideas are shared with our other protection tools.

Python Obfuscator Pipeline

When all passes finish, the engine emits a new .py file. Edge cases in the Python grammar and hosting environments mean you should always test the output in your target runtime.

Protect your Python scripts & algorithms

Take no chances, use Python Obfuscator to obfuscate, virtualize and protect your Python scripts and algorithms.

Our company has a long history in obfuscation technologies and code obfuscators (see our PowerShell, Java, AutoIt, x86 Assembly & obfuscators).

We actively bugfix, research and develop new obfuscation strategies for our tools.

You can count on our expertise and support in this field.

Installation

The preferred way of WebApi interface installation is via Composer.

Run:

And then add this import to your source code:

The package listing on Packagist will be at https://packagist.org/packages/pelock/python-obfuscator after publishing.

If you don't want to use Composer, just copy the src/PythonObfuscator.php file into your project and use include_once:

Example of obfuscating Python script source code using default options

An example of obfuscating Python script source code with customized obfuscation strategies

Check activation key status

Skip selected functions and classes

Use the Python Obfuscator Decorator package to mark functions and classes that should skip chosen strategies. You need it only to run original source. The obfuscator reads @obfuscator.skip from the AST, applies the skip, then strips the decorator and unused import obfuscator lines. Obfuscated output has no runtime dependency on this package.

Package on PyPI: https://pypi.org/project/python-obfuscator-decorator/

Installation

or

Import package name: obfuscator. PyPI distribution name: python-obfuscator-decorator.

Simple usage

Also valid:

CODE_VIRTUALIZATION skips all virtualization modes (VM, FSA, flatten) on that function or class.

Use Python Obfuscator Online

Online interface for Python Obfuscator is available at:

https://www.pelock.com/python-obfuscator/

Windows GUI client and command line version

You can download it at:

https://www.pelock.com/products/python-obfuscator/download

Python Obfuscator comes also with full GUI version for Windows

Python Obfuscator Windows Client

Obfuscation options

Python Obfuscation options

Command line interface aka CLI

Python Obfuscator ships with a command-line interface for Windows and Linux automation. Use it to integrate obfuscation into build servers, CI jobs, or batch packaging.

Python Obfuscator command-line interface

Demo mode limitations

In demo mode the obfuscator always applies integers_to_arrays, mba_binops, and encrypt_strings (no code virtualization). Source size is limited to 1000 characters.

Bartosz Wójcik


All versions of python-obfuscator with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1.0
ext-zlib Version *
ext-json Version *
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pelock/python-obfuscator contains the following files

Loading the files please wait ...