Hercules is a powerful Lua obfuscator designed to make your Lua code nearly impossible to reverse-engineer. With multiple layers of advanced obfuscation techniques, Hercules ensures your scripts are secure from prying eyes.
Hercules is very much still in development, and may not be the best yet, but we will make sure that it shall grow to be one of the best
Contact either roboxer_
or xthrx0
on discord for queries, or join the discord server
Caution
Obfuscation is not a foolproof method for protecting your code! Always consider additional security measures depending on your use case.
Note
Hercules is mainly a base lua/luau obfuscator, and a glua patch is coming soon.
- String Encoding: Obfuscates strings by encoding them in base64 with additional scrambling.
- Variable Renaming: Replaces variable names with randomly generated names.
- Control Flow Obfuscation: Adds fake control flow structures to confuse static analysis.
- Garbage Code Insertion: Injects junk code to bloat and obscure the script.
- Watermarking: Automatically appends a watermark to indicate that the code has been obfuscated by Hercules.
Tip
You can customise your level of obfuscation through the config.py
file.
-
Clone this repository:
git clone https://github.com/zeusssz/hercules-obfuscator.git cd hercules-obfuscator cd src
-
Make the
hercules
script executable:chmod +x hercules
-
Run the obfuscator:
./hercules path/to/your/script.lua
Note
Ensure you are in the working directory of the executable, i.e, src
by default
Alternatively, you can use the Lua interpreter directly if it is added to your system PATH.
-
Clone this repository using Git Bash or download the ZIP file and extract it.
-
Open Command Prompt or PowerShell and navigate to the
hercules-obfuscator
directory. -
Run the obfuscator using Lua:
lua hercules path\to\your\script.lua
To obfuscate a Lua script using Hercules, simply run:
./hercules path/to/your/script.lua # macOS/Linux
lua hercules path\to\your\script.lua # Windows
This will generate an obfuscated version of the script in the same directory, with the filename *_obfuscated.lua
.
./hercules my_script.lua # macOS/Linux
lua hercules my_script.lua # Windows
Output:
my_script_obfuscated.lua
– the obfuscated version of your script.
Or, if you specify overwrite with the --overwrite
flag, it will write back to the specified script
You can modify or add new modules to the modules/
directory to create additional layers of obfuscation. The pipeline.lua
file controls the order of obfuscation steps.
src/
│
├── hercules # Main entry point (executable)
├── pipeline.lua # Obfuscation pipeline
└── modules/ # Obfuscation modules
Important
When adding more modules to the modules/
directory, ensure you maintain integrity of the executable, and remember to add your module to the pipeline.lua
file