Encoder is a professional, lightweight, and high-performance Python Code Obfuscator, Compressor, and Packager. It is explicitly designed for developers, security researchers, and software publishers to protect sensitive intellectual property, proprietary script files, and key assets from decompilation, simple reverse engineering, and code tampering.
By leveraging a dynamic, multi-layered security pipeline combining System-Native Marshal Serializations, High-Ratio Zlib Compressions, and Base64 Payload Encoding, Encoder renders your .py scripts entirely unreadable while preserving standard interpreter speed and performance.
- 🌀 System-Native Marshal Packing: Compiles and serializes the script's AST directly into raw Python bytecode via the native
marshalmodule, severely disrupting standard decompilation attempts (e.g.uncompyle6,decompyle++). - 📦 High-Ratio Zlib Compression: Compresses compiled binary structures using deep level-9 recursive
zlibdictionaries, minimizing the protected script block file size while scrambling original source sequences. - 🛡️ Base64 Encoding Armor: Safely encapsulates intermediate compressed byte representations using robust, platform-neutral
base64character arrays to prevent text corruption across diverse systems. - 🛑 Anti-Tamper Checksums: Optionally injects embedded digital hash validations. If an encoded file is edited by even a single byte or executed under a standard attached debugger, it instantly alerts of violation and terminates execution.
- ⚡ Zero-Overlay Execution: Designed to unpack and load all bytecode structures directly into standard internal server memory, maintaining zero performance lag or file-system reads during launches.
- 🌐 Universal OS Compatibility: Compiled packages require nothing but a standard Python interpreter to execute flawlessly across Windows, Linux, and macOS.
- Python 3.8 or higher is recommended.
- Standard system modules (
base64,zlib,marshal) are pre-built into Python.
Clone the repository and jump right into the workspace directory:
git clone https://github.com/tyranroot/Obfuscator-Pro.git
cd Obfuscator-Pro
Running Encoder is incredibly straightforward. Simply invoke the script with python and supply the relative or absolute path of your target Python code.
python3 obfuscator.py /file path.pyFor paths containing spaces or specialized directories:
python3 obfuscator.py /home/your user/your script file.pyExtend the packing engine configurations by passing additional command-line parameters to customize the obfuscation depth:
| Flag | Argument | Description | Default |
|---|---|---|---|
-o, --output |
[FILENAME] |
Manually declare the output file destination. | [original]_encoded.py |
-i, --iterations |
[INT] |
Run multiple passes of the obfuscation array (1-5 layers). | 2 |
--no-compress |
None | Disables the internal zlib compression layer. | False |
--no-tamper |
None | Disables the integrity checksum and anti-analysis shield. | False |
# Force 4-passes of serializations and output to a custom location
python3 obfuscator.py /home/your user/file name.The logic structure of the encoding and decapsulation cycle represents standard modern cybersecurity designs:
┌─────────────────────────┐
│ Source Code (.py) │ <-- Standard readable code
└────────────┬────────────┘
│
▼ [Stage 1: AST Pre-processing]
┌─────────────────────────┐
│ Clean AST Parsing │ <-- Stripping out developer comments & docstrings
└────────────┬────────────┘
│
▼ [Stage 2: Bytecode Packing]
┌─────────────────────────┐
│ `marshal` Serializer │ <-- Serializes AST to native Python binary structures
└────────────┬────────────┘
│
▼ [Stage 3: Data Scrambling]
┌─────────────────────────┐
│ `zlib` Level-9 Compress │ <-- High-density recursive dictionary compression
└────────────┬────────────┘
│
▼ [Stage 4: Binary Armor]
┌─────────────────────────┐
│ `base64` Encoder │ <-- Formats binary bits into safe ASCII string characters
└────────────┬────────────┘
│
▼ [Stage 5: Self-Loading Assembly]
┌─────────────────────────┐
│ Loader Guard Wrapper │ <-- Generates dynamically decoding __exec__ block
└────────────┬────────────┘
│
▼
┌─────────────────────────┐
│ Encoded Source (.py) │ <-- Final distributed secure file
└─────────────────────────┘
No. The resulting encoded script handles all decryption, unpacks, compiles, and loads variables fully in-memory utilizing only standard built-in Python core libraries: base64, zlib, and marshal. No external pip modules are required!
Yes! You run the final encoded file exactly the same way as your original script using standard Python commands (e.g., python3 script_encoded.py).
No. Obfuscation, bytecode marshalling via marshal, multi-pass zlib compression, and final base64 parsing strip all readable metadata comments and structural mappings. This makes simple decompilation back into high-fidelity source code practically impossible. Always key backup copies of your source scripts in a private, secure repository!
Yes. Standard Windows escape character formats, single quotes, double quotes, and complex file directions are fully resolved by our robust path parser layer.
Distributed under the MIT License. See LICENSE inside the repository for full license declarations.
- Name: Maruf x ZeroTrace
- 🐙 GitHub: @tyranroot
- 💬 Telegram: @marufxzerotrace
- 📘 Facebook: Maruf x ZeroTrace
