PPX ENCRYPTION - Python 3.11/3.12/3.13 - Termux & Pydroid3
Project description
๐ PyProtectorX v5.5.0
Universal Python Code Protection
โจ 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
- PyPI: https://pypi.org/project/pyprotectorx/
- GitHub: https://github.com/zainalkhalil/pyprotectorx
- Issues: https://github.com/zainalkhalil/pyprotectorx/issues
- Documentation: https://github.com/zainalkhalil/pyprotectorx/wiki
๐ 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25c31cdaffd42842df532a3fd9a27fb669dc20f680de0c7f2f6657bbb263ea0c
|
|
| MD5 |
40dea91db7cc73fa06cc34cc1782b9ab
|
|
| BLAKE2b-256 |
32ec3bc6131767c875beb26e5a40e2322bcd45da260de1a853ba695ac7549dcc
|