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

Installation & Usage

Installation

pip install pye-extension

Basic Usage

Compile your sensitive Python file:

pyehandler compile your_script.py

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.1.tar.gz (3.9 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.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file pye_extension-0.1.1.tar.gz.

File metadata

  • Download URL: pye_extension-0.1.1.tar.gz
  • Upload date:
  • Size: 3.9 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.1.tar.gz
Algorithm Hash digest
SHA256 c890c9d4fe37516a2f648a55dd0b9c81a70fb46fbd2e0d1fc49181289c964b61
MD5 d010cbba9d0c23acaed1b7a3bdf07b7e
BLAKE2b-256 68613d7ef708217bf2e53e788e4e90acdb7bb1904eac04b658e8afcb5fc01f7e

See more details on using hashes here.

File details

Details for the file pye_extension-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pye_extension-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.9

File hashes

Hashes for pye_extension-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 63a0de722e8b83604ebc80506eb97d9d42f8040d5f7538d80cf2c4cf8a6d4bbb
MD5 4a131d48672cfabbcfd2c8ff2d2a80af
BLAKE2b-256 f796497866cbfadaef49378ea917d62fc4f4ecb6351fb2680ca7c9532e97eb9c

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