Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

50 Commits

Repository files navigation

PyDelta

PyDelta is a Python obfuscator script designed to obfuscate Python source code, making it more difficult to understand and reverse-engineer. PyDelta obfuscates your scripts with multiple layers of protection making it extremely hard for someone to deobfuscate.

The original repo has been archived and won't be maintained anymore so for the time being and the forseeable future, I'll continue making updates here. <3


Features:

  • Anti-Debugger: Adds anti-debugger code to the source to deter debugging attempts.
  • Code Compression and Encryption: Compresses and encrypts the code to make it harder to analyze.
  • String Encryption: Encrypts strings within the code to prevent easy extraction of sensitive information.
  • Inline Imports: Converts imports to inline imports to reduce readability.
  • Name Refactoring: Refactors variable, function and arguments identifiers to further obfuscate the code.
  • Code Compilation: Uses Nuitka to compile code to an executable.

Usage:

PyDelta is indeed possible to be installed locally without it being on pypi.

Install PyDelta locally by using the following commands:

git clone https://github.com/therealOri/PyDelta-PythonObfuscator.git
cd PyDelta-PythonObfuscator/
virtualenv dvpENV
source dvpENV/bin/activate | (this activation will be different on windows.)
pip install .
pip install psutil pycryptodome

Example Usage:

frompydeltaimportdelta_obfuscatefromdataclassesimportdataclass# <-- Optionalsource_code="""# Your Python source code hereprint('Hello World!')"""#Default Config@dataclass# <-- OptionalclassConfig:
add_anti_dbg: bool=Trueinline_imports: bool=Truerefactor_names: bool=Trueencrypt_str: bool=Truecompress_encrypt: bool=Truestr_encryption_amount: int=3compress_encrypt_amount: int=30compile_code: bool=Falseoutputfile: str='my_obf_code.py'obfuscated_code=delta_obfuscate(source_code, config=Config())

Or you can simply run the pydelta-obfuscate command.

Parameters:

  • source_code: Source code to obfuscate
  • add_anti_dbg: Whether to add anti-debugger code (default: True).
  • inline_imports: Whether to convert imports to inline imports (default: True).
  • refactor_names: Whether to refactor variable and function names (default: True).
  • encrypt_str: Whether to encrypt strings in the code (default: True).
  • compress_encrypt: Whether to compress and encrypt the entire code (default: True).
  • str_encryption_amount: Number of times to encrypt strings (default: 3).
  • compress_encrypt_amount: Number of times to compress and encrypt the code (default: 30).
  • compile_code: Whether to compile your code or not. (default: False).

CLI Arguments:

  • --no-add-anti-dbg
  • --no-inline-imports
  • --no-refactor-names
  • --no-encrypt-str
  • --no-compress-encrypt
  • --code-compile
  • --no-code-compile
  • --str-encryption-amount: Number of times to encrypt strings (default: 3).
  • --compress-encrypt-amount: Number of times to compress and encrypt the code (default: 30).

Notes

  • This version of PyDelta is still in development and some features may not be fully functional.
  • Runtime code is obfuscated by choice which can make maintaining a little tricky, even if those function will likely remain untouched in future releases a module will be used.

License

This project is licensed under the MIT License.




Support | Buy me a coffee <3

Donate to me here:

image

About

PyDelta is a Python script designed to obfuscate Python source code, making it more difficult to understand and reverse-engineer.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages