Cobertos / bobskater

An AST based Python obfuscator that robustly mangles variable names
MIT License
4 stars 0 forks source link

build status pypi python versions twitter twitter

bobskater

An AST based Python obfuscator that robustly mangles names and other obfuscations of Python code

Current limitations:

Installation

pip install bobskater

Usage

bobskater provides a few mechanisms for direct use.

Both take keyword arguments for configuration:

There are no other obfuscations performed than the two mentioned above currently in bobskater

Example

from bobskater import obfuscateString

myFileContents = open('myfile.py', 'r').read()

#Will obfuscate myFileContents and return it into output. Names will not be mangled, only docstrings will be removed
output = obfuscateString(myFileContents, obfuscateNames=False)

Contributing

Testing:

pytest - Runs all the tests

Releasing:

Refer to the python docs on packaging for clarification. Make sure you've updated setup.py, and have installed twine, setuptools, and wheel python3 setup.py sdist bdist_wheel - Create a source distribution and a binary wheel distribution into dist/ twine upload dist/bobskater-x.x.x* - Upload all dist/ files to PyPI of a given version Make sure to tag the commit you released