Skip to main content

PPX ENCRYPTION - Python 3.11/3.12/3.13 - Termux & Pydroid3

Project description

๐Ÿ” PyProtectorX v5.5.0

Universal Python Code Protection

Python PyPI License Mobile

โœจ Features

  • ๐Ÿ”’ Military-grade encryption (ChaCha20 + PBKDF2 150k iterations)
  • ๐Ÿ Python 3.11, 3.12, 3.13 support
  • ๐Ÿ“ฑ Mobile optimized - Termux & Pydroid3
  • ๐Ÿš€ Simple API - 3 functions
  • ๐Ÿ’ช Zero dependencies - Pure Python
  • โšก Fast - Optimized for all platforms

๐Ÿ“ฆ Installation

# Desktop / PC / Mac
pip install pyprotectorx

# Termux (Android)
pkg install python
pip install pyprotectorx

# Pydroid3 (Android)
# Menu โ†’ Pip โ†’ Search: pyprotectorx โ†’ Install

๐ŸŽฏ Quick Start

Command Line (Easiest)

# Protect any Python file
pyprotectorx script.py

# Run protected file
python script.protected.py

Python API

from pyprotectorx import protect

# Protect file
protect("script.py")
# Output: script.protected.py

Advanced API

from pyprotectorx import encrypt, run

# Encrypt code
source = 'print("Hello, World!")'
encrypted = encrypt(source)

# Run encrypted code
run(encrypted)

๐Ÿ“– Complete Examples

Example 1: Basic Usage

# Create test script
echo 'print("Secret Code!")' > test.py

# Protect it
pyprotectorx test.py

# Run protected version
python test.protected.py
# Output: Secret Code!

Example 2: Termux

# Install
pkg install python -y
pip install pyprotectorx

# Protect your script
cd ~/storage/shared
pyprotectorx myapp.py

# Share the protected file
python myapp.protected.py

Example 3: Pydroid3

from pyprotectorx import protect

# Protect file
protect("/sdcard/Download/script.py")

# Output: /sdcard/Download/script.protected.py

๐Ÿ”ฅ API Reference

protect(input_file, output_file=None)

Easiest method - Protect a Python file

from pyprotectorx import protect

protect("app.py")  # โ†’ app.protected.py
protect("app.py", "secure.py")  # โ†’ secure.py

encrypt(source_code)

Encrypt Python source code

from pyprotectorx import encrypt

encrypted = encrypt('print("Hi")')
# Returns: bytes

run(encrypted_data)

Execute encrypted code

from pyprotectorx import run

namespace = run(encrypted_data)
# Returns: dict with execution namespace

info()

Show version information

from pyprotectorx import info

print(info())
# {'version': '5.5.0', 'python': '3.12.0', ...}

๐Ÿ›ก๏ธ Security Features

Layer Technology
1 ChaCha20 stream cipher
2 PBKDF2 (150,000 iterations)
3 HMAC-SHA256 authentication
4 Blake2b cryptographic hashing
5 SHA3-256 additional hashing
6 CRC32 integrity checking
7 Zlib compression layer
8 Custom obfuscation layers
9 Bundle sealing

โš™๏ธ How It Works

Python Source Code
       โ†“
[1] Syntax validation
       โ†“
[2] Compile to bytecode
       โ†“
[3] Marshal serialization
       โ†“
[4] Custom compression + encryption
       โ†“
[5] ChaCha20 encryption
       โ†“
[6] HMAC authentication
       โ†“
[7] Bundle sealing with metadata
       โ†“
[8] Base64 encoding
       โ†“
Protected Python File

๐Ÿ“ฑ Mobile Development Tips

Termux Best Practices

# Storage access
termux-setup-storage

# Work in shared storage
cd ~/storage/shared

# Protect scripts
pyprotectorx script.py

Pydroid3 Tips

# Use full paths
from pyprotectorx import protect

# Protect file in Downloads
protect("/sdcard/Download/app.py")

# Protect file in Documents
protect("/sdcard/Documents/script.py")

โš ๏ธ Requirements & Limitations

Requirements

  • Python 3.11, 3.12, or 3.13
  • No additional dependencies

Limitations

  • Maximum file size: 100 MB
  • Source code must have valid syntax
  • Python 3.14+ not yet supported

Compatibility

โœ… Linux, macOS, Windows
โœ… Termux (Android)
โœ… Pydroid3 (Android)
โœ… Raspberry Pi
โœ… Cloud environments

๐Ÿ› Troubleshooting

Error: "Python 3.11+ required"

# Check Python version
python --version

# Termux: Install Python 3.11+
pkg install python

# Pydroid3: Update app to latest version

Error: "Failed to load core"

# Reinstall package
pip uninstall pyprotectorx -y
pip install --no-cache-dir pyprotectorx

Error: "Syntax error in source"

# Validate your script first
python -m py_compile script.py

Protected file too large

# Use direct encryption API
from pyprotectorx import encrypt
import base64

encrypted = encrypt(source_code)
# Store encrypted bytes separately
with open('data.bin', 'wb') as f:
    f.write(encrypted)

๐Ÿ”’ Security Notice

โš ๏ธ Important: No encryption is unbreakable. PyProtectorX makes reverse engineering significantly harder but cannot guarantee absolute protection against determined attackers with unlimited resources.

Good for:

  • โœ… Protecting proprietary algorithms
  • โœ… Preventing casual code inspection
  • โœ… Obfuscating business logic
  • โœ… License key protection
  • โœ… Anti-tampering measures

Not a substitute for:

  • โŒ Proper authentication systems
  • โŒ Secure password storage
  • โŒ Network security
  • โŒ Server-side validation

๐Ÿ“Š Version History

v5.5.0 (Latest)

  • โœจ Added Python 3.13 support
  • ๐Ÿš€ Improved mobile performance
  • ๐Ÿ› Bug fixes and optimizations
  • ๐Ÿ“ฑ Enhanced Termux compatibility

v5.1.0

  • โœจ Python 3.11 & 3.12 support
  • ๐Ÿ“ฑ Termux & Pydroid3 optimization
  • ๐Ÿ”’ Enhanced encryption layers

๐Ÿ”— Links

๐Ÿ“„ License

MIT License - Copyright (c) 2025 Zain Alkhalil

See LICENSE file for details.

๐Ÿ‘จโ€๐Ÿ’ป Author

Zain Alkhalil

  • Specialized in Python security & cryptography
  • Mobile development enthusiast
  • Open source contributor

๐ŸŒŸ Support the Project

If you find PyProtectorX useful:

  • โญ Star on GitHub
  • ๐Ÿ› Report bugs
  • ๐Ÿ’ก Suggest features
  • ๐Ÿ“ข Share with others
  • โ˜• Buy me a coffee

๐Ÿ™ Acknowledgments

Thanks to all contributors and users who helped improve PyProtectorX!


Made with โค๏ธ for the Python community

Protect your code. Protect your work. Protect your future.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

pyprotectorx-5.5.0-py3-none-any.whl (56.9 kB view details)

Uploaded Python 3

File details

Details for the file pyprotectorx-5.5.0-py3-none-any.whl.

File metadata

  • Download URL: pyprotectorx-5.5.0-py3-none-any.whl
  • Upload date:
  • Size: 56.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.10

File hashes

Hashes for pyprotectorx-5.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 25c31cdaffd42842df532a3fd9a27fb669dc20f680de0c7f2f6657bbb263ea0c
MD5 40dea91db7cc73fa06cc34cc1782b9ab
BLAKE2b-256 32ec3bc6131767c875beb26e5a40e2322bcd45da260de1a853ba695ac7549dcc

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