Skip to main content

An in-place obfuscator for python 3.11

Project description

PyObf 2

A "continuation" of sorts of the old, private pyobf.

Installing

The package now has a pypi! https://pypi.org/project/pyobf2/

Install with python3 -m pip install pyobf2

Usage

The obfuscator has an API, to allow you to integrate it into your own projects. For example, it can be used to obfuscate the output of a code generator automatically. An example usages of the API can be found in examples/api/. If you end up using the API, please credit this repository.

If you just want to run the obfuscator, run pyobf2 or python3 -m pyobf2 after installing it

API usage

As previously mentioned, the examples/api/ directory contains examples on how the api works. Some notes are required, though:

  • When obfuscating multiple files that depend on each other, use do_obfuscation_batch_ast, instead of calling do_obfuscation_single_ast on all of them separately. This will allow the obfuscator to draw conclusions on which file depends on which other file, and allows it to understand the structure between them.
  • do_obfuscation_batch_ast is a generator. It will progressively yield each step it does, to allow for progress bar rendering. It will do nothing when not iterated through.
  • Some transformers (eg. packInPyz, compileFinalFiles) only act on the output files of the obfuscation process, and do nothing in the standard run. To invoke them, use do_post_run. This will require you to write the obfuscated AST into a file, though.

Feedback & bugs

The obfuscator is in no way perfect as of now, so feedback is encouraged. Please tell me how bad my code is in the issues tab.

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

pyobf2-1.1.6.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

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

pyobf2-1.1.6-py3-none-any.whl (32.8 kB view details)

Uploaded Python 3

File details

Details for the file pyobf2-1.1.6.tar.gz.

File metadata

  • Download URL: pyobf2-1.1.6.tar.gz
  • Upload date:
  • Size: 26.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.9 Linux/5.15.0-58-generic

File hashes

Hashes for pyobf2-1.1.6.tar.gz
Algorithm Hash digest
SHA256 da0ecb58e4b135b45614c7415128e7aecf8cdb6f1b525cdac43549b9f23a2e40
MD5 04df609d775ec695bdc1bfe84b237d00
BLAKE2b-256 efc2386470be8bcfc3d639b61545e8388c6750e31c4acdf7dbd683327ba55f38

See more details on using hashes here.

File details

Details for the file pyobf2-1.1.6-py3-none-any.whl.

File metadata

  • Download URL: pyobf2-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 32.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.9 Linux/5.15.0-58-generic

File hashes

Hashes for pyobf2-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 dca772f4d99a429408d3dfedf7c0390f3b2466e1bb618e4a9bcbb885c5c0c044
MD5 ca77a7fcda7c7b5d61c11ac179a7f09b
BLAKE2b-256 bfa4ca9fe37637c16624f37c5fd369f8a5dcd2274161d55a8de833a8059f864c

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