Skip to main content

Professional-grade Python obfuscation and Cython-based compilation suite.

Project description

PyxBlend - Ultimate Python Obfuscation Suite

Python Version License

pyxblend is a professional-grade Python code protection suite designed for developers who need to secure their intellectual property. It moves beyond simple obfuscation by integrating advanced cryptographic layering and native Cython compilation.

Installation

pip install pyxblend

Quick Start & Examples

Here is how to use each encryption method to protect your Python scripts.

Basic Setup

First, import the library and initialize the encryptor:

from pyxblend import PyxBlend

# Initialize the encryptor
encryptor = PyxBlend()

# The code you want to protect
source_code = """
def secret_function():
    print("This is highly confidential code!")
    print("Logic hidden from prying eyes.")

if __name__ == "__main__":
    secret_function()
"""

Method 1: Enhanced Compression (m1)

Best for: General purpose obfuscation where file size and speed are important.

# Encrypt using Method 1
encrypted_code = encryptor.encrypt(source_code, method=1)

# Save to a new file
with open("protected_script_m1.py", "w") as f:
    f.write(encrypted_code)

print("Saved protected_script_m1.py")

Method 2: Junk Code & Base85 (m2)

Best for: Confusing static analysis tools and decompilers by injecting junk code.

# Encrypt using Method 2
encrypted_code = encryptor.encrypt(source_code, method=2)

# Save to a new file
with open("protected_script_m2.py", "w") as f:
    f.write(encrypted_code)

print("Saved protected_script_m2.py")

Method 3: Pure Cython Compilation (m3) - ULTRA SECURE

Best for: Production releases. This compiles your Python code into a C-extension binary. Note: This method generates a loader that compiles the code on the target machine. Ensure gcc is available.

# Encrypt using Method 3
encrypted_code = encryptor.encrypt(source_code, method=3)

if encrypted_code:
    # Save to a new file
    with open("protected_script_m3.py", "w") as f:
        f.write(encrypted_code)
    print("Saved protected_script_m3.py")
else:
    print("Encryption failed! Ensure Cython and GCC are installed.")

Advanced: Random Layering

Best for: Maximum confusion. Apply multiple layers of random obfuscation before the final lock.

# Apply 5 layers of random m1/m2 encryption
layered_code = encryptor.random_encrypt(source_code, iterations=5)

# Then apply the final Cython lock (Method 3)
final_product = encryptor.encrypt(layered_code, method=3)

with open("ultra_secure_script.py", "w") as f:
    f.write(final_product)

Methods Guide

Method Description Security Level
m1 Enhanced Compression: Variable renaming + Lambda wrapping + LZMA/Base64. Medium
m2 Obfuscation: Junk code injection + Minification + Base85 encoding. Medium-High
m3 Native Compilation: Encrypts source, converts to C via Cython, compiles to binary. Ultra High

Requirements

  • Python 3.8+
  • cython (for method 3)
  • python_minifier
  • GCC or Clang (for method 3 compilation)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

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

Source Distribution

pyxblend-2.0.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

pyxblend-2.0.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file pyxblend-2.0.0.tar.gz.

File metadata

  • Download URL: pyxblend-2.0.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pyxblend-2.0.0.tar.gz
Algorithm Hash digest
SHA256 030791c580264e94fd478b8ee0340787b9a0689eb39e9b3b4465cbe3c808ac92
MD5 7152bcd6edbfc269bcecdd87ca00bb65
BLAKE2b-256 80209d6bfbe28cdc14d53369858e4177b528489665384e972f743fb43b7640bb

See more details on using hashes here.

File details

Details for the file pyxblend-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyxblend-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pyxblend-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acdce3c425c351ba29042c46f10f4635bd6c404d9940ff6a36426467d133749a
MD5 c6dd491bb2acca5d0416c65b5249d8d7
BLAKE2b-256 4db3b12fd2083fdd12402ec96a8a394bc049a8e2353fc43131d431aba403de1a

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