Advanced Python code protection beyond pyc files
Project description
Universal Python Code Obfuscator & VM Loader
This repo proposes using an obfuscation and encryption approach for Python code.
Understanding Python Bytecode Vulnerabilities
Structural Transparency
- Preservation of function signatures and class hierarchies
- Retention of original control flow patterns
- Maintained symbol references and name bindings
Decompilation Vulnerabilities
- Deterministic bytecode generation patterns
- Preserved type information and annotations
- Recoverable import hierarchies
Why PyE?
Standard Python bytecode (.pyc files) is easily decompilable due to several inherent limitations:
- Multi-layered protection strategy
- Advanced encryption techniques
- Custom execution environment
Inspiration
Common Vulnerabilities in Open Source AI packages:
- Easily bypassed safety checks
- Modifiable content filters
- Exposed prompt sanitization
Critical Protection Needs
- Model interaction guardrails
- Input/output filtering logic
- Usage tracking mechanisms
- Security parameter preservation
Features
✅ Stronger protection than .pyc files ✅ No source code exposure ✅ Works with existing Python imports ✅ Cross-platform compatibility ✅ Simple integration ✅ Minimal performance impact
Important Notes
Compatibility
- Requires Python 3.8+
- Works on Windows, Linux, and macOS
- Requires the cryptography and Cython packages
Limitations
- While significantly more secure than .pyc, no protection is unbreakable. DO NOTE THIS IS EXTREMELY IMPORTANT
- Performance may be slower
- Debug information is limited in protected modules
License
Proprietary - All Rights Reserved Copyright (c) 2024 oha
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 pye_extension-0.1.tar.gz.
File metadata
- Download URL: pye_extension-0.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62544fed476ee38d4b660996ec4b00f3b988932844da623755ecd6245eef6630
|
|
| MD5 |
29a0d015c4fd300dfec917aacf44a225
|
|
| BLAKE2b-256 |
fcada9d50735cd7cbcbb5494180e8ecd3b35cab0069155096b652b78066fb984
|
File details
Details for the file pye_extension-0.1-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: pye_extension-0.1-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 31.5 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c65f8d0f999fbaabbc276a0a86d10e3336a8c8206e26617806b2cb14f6492428
|
|
| MD5 |
ef7ecff4b05c8529eb44143f0ae538af
|
|
| BLAKE2b-256 |
d05f1191f2b358df349c60369b23c98a85516e77ca5fa208c0c28cfbe31402b7
|