Skip to main content

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


Download files

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

Source Distribution

pye_extension-0.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

pye_extension-0.1-cp310-cp310-macosx_11_0_arm64.whl (31.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Hashes for pye_extension-0.1.tar.gz
Algorithm Hash digest
SHA256 62544fed476ee38d4b660996ec4b00f3b988932844da623755ecd6245eef6630
MD5 29a0d015c4fd300dfec917aacf44a225
BLAKE2b-256 fcada9d50735cd7cbcbb5494180e8ecd3b35cab0069155096b652b78066fb984

See more details on using hashes here.

File details

Details for the file pye_extension-0.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pye_extension-0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c65f8d0f999fbaabbc276a0a86d10e3336a8c8206e26617806b2cb14f6492428
MD5 ef7ecff4b05c8529eb44143f0ae538af
BLAKE2b-256 d05f1191f2b358df349c60369b23c98a85516e77ca5fa208c0c28cfbe31402b7

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