Skip to main content

PySimpleObfuscate

The Easiest Way to Encrypt your .py files

Installation to Local Folder using PIP

Linux / MacOS

user@machine:~$ pip install ./PySimpleObfuscate --upgrade -t ~/.local/lib/<PYTHON>/site-packages/PyObfuscate
user@machine:~$ export PATH="~/.local/lib/<PYTHON>/site-packages/PySimpleObfuscate/bin:$PATH"

Windows

user@machine:~$ pip install ./PySimpleObfuscate --upgrade -t ~/.local/lib/<PYTHON>/site-packages/PySimpleObfuscate

CLI Usage

user@machine:~$ pyobfuscate --help
usage: PySimpleObfuscate [-h] [--dest DEST] [--msg MSG] SRC

A simple python obfuscator

positional arguments:
  SRC          Filepath to the file(s) to obfuscate

options:
  -h, --help   show this help message and exit
  --dest DEST  Destination Folder
  --msg MSG    Encoding Warning

API Usage

from PySimpleObfuscate.lib.framework import encrypt_file, encrypt_source, cyphers

src = "/path/to/file.py"
dest = "/path/to/dest.py"

encrypt_file(src, dest, varnames=["your", "message", "here"], cyphers=cyphers, iterations=6)

source = """#!/bin/env python3
print("hello world")
"""

program = encrypt_source(seed=src, varnames=varnames, cyphers=cyphers, iterations=iterations)

header = """#!/bin/env python
import base64
import codecs
"""

program = """%s

%s

""" % (header, program,)

with open("encoded.py", "wb") as f:
    f.write(program)
    f.close()

EXAMPLE OUTPUT

import base64
import codecs

obfuscated="RTVQNzY4M0xFOVNOSU9IODU0VDBLODEw"
file="NDBHNjZQQk1DNUpJRzhKTEU5U05JT0gwRDlINkFVQkg0OEtHS1RCSUY1U000QTE5"
contents="b2JmdXNjYXRlZCA9IGJhc2U2NC5iNjRkZWNvZGUoYnl0ZXMob2JmdXNjYXRlZCwgJ3V0Zi04JykpLmRlY29kZSgndXRmLTgnKTtvYmZ1c2NhdGVkID0gY29kZWNzLmRlY29kZShzdHIob2JmdXNjYXRlZCksICdyb3RfMTMnKTtvYmZ1c2NhdGVkID0gY29kZWNzLmRlY29kZShzdHIob2JmdXNjYXRlZCksICdyb3RfMTMnKTtvYmZ1c2NhdGVkID0gYmFzZTY0LmIzMmhleGRlY29kZShieXRlcyhvYmZ1c2NhdGVkLCAndXRmLTgnKSkuZGVjb2RlKCd1dGYtOCcpO29iZnVzY2F0ZWQgPSBjb2RlY3MuZGVjb2RlKHN0cihvYmZ1c2NhdGVkKSwgJ3JvdF8xMycpO29iZnVzY2F0ZWQgPSBjb2RlY3MuZGVjb2RlKHN0cihvYmZ1c2NhdGVkKSwgJ3JvdF8xMycpO29iZnVzY2F0ZWQgPSBjb2RlY3MuZGVjb2RlKHN0cihvYmZ1c2NhdGVkKSwgJ3JvdF8xMycpO2ZpbGUgPSBiYXNlNjQuYjY0ZGVjb2RlKGJ5dGVzKGZpbGUsICd1dGYtOCcpKS5kZWNvZGUoJ3V0Zi04Jyk7ZmlsZSA9IGNvZGVjcy5kZWNvZGUoc3RyKGZpbGUpLCAncm90XzEzJyk7ZmlsZSA9IGNvZGVjcy5kZWNvZGUoc3RyKGZpbGUpLCAncm90XzEzJyk7ZmlsZSA9IGJhc2U2NC5iMzJoZXhkZWNvZGUoYnl0ZXMoZmlsZSwgJ3V0Zi04JykpLmRlY29kZSgndXRmLTgnKTtmaWxlID0gY29kZWNzLmRlY29kZShzdHIoZmlsZSksICdyb3RfMTMnKTtmaWxlID0gY29kZWNzLmRlY29kZShzdHIoZmlsZSksICdyb3RfMTMnKTtmaWxlID0gY29kZWNzLmRlY29kZShzdHIoZmlsZSksICdyb3RfMTMnKTtldmFsKGNvbXBpbGUoZXZhbCgiXHg2Zlx4NjJceDY2XHg3NVx4NzNceDYzXHg2MVx4NzRceDY1XHg2NCIpICsgZXZhbCgiXHg2Nlx4NjlceDZjXHg2NSIpLCAnPHN0cmluZycsICdleGVjJykp"
eval(compile(base64.b64decode(contents).decode("utf-8"), '<string>', 'exec'))

Metadata

Release files for PySimpleObfuscate 0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PySimpleObfuscate 0.6
File Size Uploaded Provenance Actions
pysimpleobfuscate-0.6.tar.gz 5.6 kB Without provenance Details for pysimpleobfuscate-0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for PySimpleObfuscate 0.6
File Interpreter ABI Platform Actions
PySimpleObfuscate-0.6-py3-none-any.whl Python 3 none any Details for PySimpleObfuscate-0.6-py3-none-any.whl

Total release size: 11.4 kB

Release files / pysimpleobfuscate-0.6.tar.gz

Download URL pysimpleobfuscate-0.6.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
47d19efa580b0d64b20da8067e0cf12ca294d7c237388150269ebc7e2a4d8442
BLAKE2b-256 checksum
How to use checksums
e1a2d04051b9dcbe697d7d30dbe2c4c8f3c81aeca65ab84396529e2082cc90d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.3

Release files / PySimpleObfuscate-0.6-py3-none-any.whl

Download URL PySimpleObfuscate-0.6-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0641878d5d4cbe1151053c63c9a1c1ec2f2df87f8d1db47d1fd0e0cd0faaaa0
BLAKE2b-256 checksum
How to use checksums
af76b1a03d015d8cb137f9a9b2a73a1c37e9470446676d9691cbb175a002cfcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.3

Security for PySimpleObfuscate 0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page