Prometheus is a Lua obfuscator written in pure Lua.
It applies a range of AST-based transformations to make source code significantly harder to read, analyze, and reverse engineer.
These include techniques such as control-flow flattening, constant encryption, and other Lua-specific obfuscation strategies.
The project was inspired by the excellent javascript-obfuscator.
Currently, Prometheus supports:
- Lua 5.1
- LuaU (basic support is available, but still not fully finished)
Try the browser version first:
Install latest release with one command:
curl -fsSL https://raw.githubusercontent.com/prometheus-lua/Prometheus/master/install.sh | shThen use the CLI directly:
prometheus-lua --version
prometheus-lua --preset Medium ./your_file.luaThe release bundle includes a Lua runtime, so no separate Lua install is required for the packaged CLI.
To update to the latest release:
prometheus-lua updateTo uninstall:
rm -f ~/.local/bin/prometheus-lua && rm -rf ~/.local/share/prometheus-luagit clone https://github.com/prometheus-lua/Prometheus.git
cd Prometheus
lua cli.lua --preset Medium ./your_file.lua|
Works on structured syntax trees instead of simple text replacements. |
Implemented in pure Lua with no heavy external runtime dependencies. |
Focused on real obfuscation passes useful for shipped Lua applications. |
- Control-flow obfuscation / flattening
- Constant and string encryption
- Lua-specific runtime tricks
- Anti-tamper related transformations
- Additional AST-based obfuscation passes
You can find the full documentation, including the getting started guide, here:
Packaged CLI releases include a bundled Lua runtime. For source usage, Prometheus requires LuaJIT or Lua 5.1+.
Lua 5.1 binaries can be downloaded here:
https://sourceforge.net/projects/luabinaries/files/5.1.5/Tools%20Executables/
-- input.lua
print("Hello, World!");-- input.obfuscated.lua
return(function(...)local L={"afT6mf1V","/7mJXsuvmE1c/fT3";"tn1ZSn6=","37ghSJM=";"WqermfWAWuuZpb3XX7M=","tqXGSJ3u","XQXpL9x21dxAWJa//p==","SrM=";"3q+5SJM=","/D==";"t7XUt0p=";"mIeOmIx9";"LdgrBfWdWuNABsb+KJxj","SJWJ4dahKsebW7t+KQv=","/cDu3AvP/D==";"Llv7uD==","tJWhFfTE";"TQ43ctIuy9HIop==","mEu93p==";"WJax1sXEXEaxWuxGt6==","t0gPSEp=",...
-- remaining obfuscated output omittedFor more advanced use cases, configuration, and presets, see the documentation.
To run the Prometheus test suite:
lua ./tests.lua [--Linux]Prometheus has an official Discord server:
Prometheus is licensed under the Prometheus License, a modified MIT-style license.
You are free to use, modify, and distribute this software, including for commercial purposes, under the following conditions:
- Any commercial product, wrapper, or service (including SaaS or hosted solutions) that uses or integrates Prometheus must include clear attribution to:
Based on Prometheus by Elias Oelschner, https://github.com/prometheus-lua/Prometheus
- The attribution must be visible in the product’s:
- UI
- documentation
- public website
- The obfuscated output files generated by Prometheus do not need to include any license or copyright notice.
- Derivative works and public forks must also include a statement in their README noting that they are based on Prometheus.
Full license text: Prometheus License
