tavurth / godot-gdscript-obfuscator

Start of the work to obfuscate GDscript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table of Contents

  1. Usage
    1. ‼ Use this at your own risk ‼
    2. Dependencies
    3. Running the obfuscator
    4. # no-mangle
    5. Examples
      1. Before
      2. After
  2. Support

Usage

This project was not really ready for production use and was more used as a way to show what might be possible.

The proposal to read if you find this repository interesting: godotengine/godot-proposals#4220

Please do not attempt to use this to mangle your project files 🙏

‼ Use this at your own risk ‼

This is very early work and this will mess up your game if you don’t have a git backup.

Currently not production ready, built more as an example of what we could do for GDScript obfuscation

Dependencies

This currently uses pt (platinum-searcher) for quickly finding all of the references in the project. In the future we will probably move this to pure python.

Running the obfuscator

  1. Put this script in your game directory
  2. Ensure DRY_RUN is True at the top of the file (only prints changes)
  3. python3 obfuscator.py

# no-mangle

Currently # no-mangle keyword is supported only for function names

func my_function(): # no-mangle
	pass

Which will keep the name of the function intact

Examples

Before

img

After

img

Support

Currently this is something that I will work on when I have some free time. If you like this project and want me to work on it more, consider buying me a coffee ☕️

Buy Me A Coffee

About

Start of the work to obfuscate GDscript

License:GNU General Public License v3.0


Languages

Language:Python 94.9%Language:GDScript 5.1%