|
| 1 | +<div align="center"> |
| 2 | + |
| 3 | +<img width="100%" src="https://capsule-render.vercel.app/api?type=waving&height=180&color=gradient&text=Prometheus&fontAlign=50&fontAlignY=35&fontSize=42&desc=Lua%20Obfuscator%20%E2%80%A2%20AST%20Transformations%20%E2%80%A2%20Control%20Flow%20Obfuscation&descAlign=50&descAlignY=60" /> |
| 4 | + |
| 5 | +<a href="https://github.com/prometheus-lua/Prometheus"> |
| 6 | + <img src="https://readme-typing-svg.demolab.com?font=JetBrains+Mono&weight=600&size=24&duration=2500&pause=900¢er=true&vCenter=true&width=760&lines=Pure+Lua+Obfuscation;AST+Transforms+%E2%80%A2+Encryption+%E2%80%A2+Anti-Tamper;Lua+5.1+and+LuaU+support;Built+for+practical+code+protection" alt="Typing SVG" /> |
| 7 | +</a> |
| 8 | + |
| 9 | +<br/> |
| 10 | + |
| 11 | +<a href="https://github.com/prometheus-lua/Prometheus/actions/workflows/Test.yml"> |
| 12 | + <img src="https://img.shields.io/github/actions/workflow/status/prometheus-lua/Prometheus/Test.yml?branch=master&style=for-the-badge&label=Tests" alt="Tests" /> |
| 13 | +</a> |
| 14 | +<a href="https://github.com/prometheus-lua/Prometheus/stargazers"> |
| 15 | + <img src="https://img.shields.io/github/stars/prometheus-lua/Prometheus?style=for-the-badge&logo=github&label=Stars" alt="GitHub stars" /> |
| 16 | +</a> |
| 17 | +<a href="https://github.com/prometheus-lua/Prometheus"> |
| 18 | + <img src="https://img.shields.io/github/last-commit/prometheus-lua/Prometheus?style=for-the-badge&label=Last%20Update" alt="Last commit" /> |
| 19 | +</a> |
| 20 | +<a href="https://discord.gg/U8h4d4Rf64"> |
| 21 | + <img src="https://img.shields.io/badge/Discord-Join%20Server-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Discord server" /> |
| 22 | +</a> |
| 23 | + |
| 24 | +</div> |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +## About |
| 29 | + |
| 30 | +**Prometheus** is a Lua obfuscator written in pure Lua. |
| 31 | + |
| 32 | +It applies a range of **AST-based transformations** to make source code significantly harder to read, analyze, and reverse engineer. |
| 33 | +These include techniques such as **control-flow flattening**, **constant encryption**, and other Lua-specific obfuscation strategies. |
| 34 | + |
| 35 | +The project was inspired by the excellent [javascript-obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator). |
| 36 | + |
| 37 | +Currently, Prometheus supports: |
| 38 | + |
| 39 | +- **Lua 5.1** |
| 40 | +- **LuaU** *(basic support is available, but still not fully finished)* |
| 41 | + |
| 42 | +--- |
| 43 | + |
| 44 | +## Preview |
| 45 | + |
| 46 | +<p align="center"> |
| 47 | + <img src="assets/readme/obfuscation-preview.gif" alt="Prometheus obfuscation process preview" width="900" /> |
| 48 | +</p> |
| 49 | + |
| 50 | +--- |
| 51 | + |
| 52 | +## Highlights |
| 53 | + |
| 54 | +<div align="center"> |
| 55 | +<table> |
| 56 | +<tr> |
| 57 | +<td width="33%" valign="top"> |
| 58 | + |
| 59 | +### AST-Based |
| 60 | +Works on structured syntax trees instead of simple text replacements. |
| 61 | + |
| 62 | +</td> |
| 63 | +<td width="33%" valign="top"> |
| 64 | + |
| 65 | +### Pure Lua |
| 66 | +Implemented in pure Lua with no heavy external runtime dependencies. |
| 67 | + |
| 68 | +</td> |
| 69 | +<td width="33%" valign="top"> |
| 70 | + |
| 71 | +### Practical Protection |
| 72 | +Focused on real obfuscation passes useful for shipped Lua applications. |
| 73 | + |
| 74 | +</td> |
| 75 | +</tr> |
| 76 | +</table> |
| 77 | +</div> |
| 78 | + |
| 79 | +### Included techniques |
| 80 | + |
| 81 | +- Control-flow obfuscation / flattening |
| 82 | +- Constant and string encryption |
| 83 | +- Lua-specific runtime tricks |
| 84 | +- Anti-tamper related transformations |
| 85 | +- Additional AST-based obfuscation passes |
| 86 | + |
| 87 | +--- |
| 88 | + |
| 89 | +## Documentation |
| 90 | + |
| 91 | +You can find the full documentation, including the getting started guide, here: |
| 92 | + |
| 93 | +<p align="center"> |
| 94 | + <a href="https://levno-710.gitbook.io/prometheus"> |
| 95 | + <img src="https://img.shields.io/badge/Documentation-Read%20the%20Docs-111111?style=for-the-badge&logo=gitbook&logoColor=white" alt="Documentation" /> |
| 96 | + </a> |
| 97 | +</p> |
| 98 | + |
| 99 | +--- |
| 100 | + |
| 101 | +## Installation |
| 102 | + |
| 103 | +Clone the repository: |
| 104 | + |
| 105 | +```bash |
| 106 | +git clone https://github.com/prometheus-lua/Prometheus.git |
| 107 | +cd Prometheus |
| 108 | +``` |
| 109 | + |
| 110 | +Alternatively, you can download the sources directly [here](https://github.com/prometheus-lua/Prometheus/archive/refs/heads/master.zip). |
| 111 | + |
| 112 | +### Requirements |
| 113 | + |
| 114 | +Prometheus requires **LuaJIT** or **Lua 5.1** in order to run. |
| 115 | + |
| 116 | +Lua 5.1 binaries can be downloaded here: |
| 117 | +https://sourceforge.net/projects/luabinaries/files/5.1.5/Tools%20Executables/ |
| 118 | + |
| 119 | +--- |
| 120 | + |
| 121 | +## Quick Start |
| 122 | + |
| 123 | +To quickly obfuscate a script, run: |
| 124 | + |
| 125 | +```bash |
| 126 | +lua ./cli.lua --preset Medium ./your_file.lua |
| 127 | +``` |
| 128 | + |
| 129 | +--- |
| 130 | + |
| 131 | +## Example |
| 132 | + |
| 133 | +### Input |
| 134 | + |
| 135 | +```lua |
| 136 | +-- input.lua |
| 137 | +print("Hello, World!"); |
| 138 | +``` |
| 139 | + |
| 140 | +### Obfuscated output |
| 141 | + |
| 142 | +```lua |
| 143 | +-- input.obfuscated.lua |
| 144 | +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=",... |
| 145 | +-- remaining obfuscated output omitted |
| 146 | +``` |
| 147 | + |
| 148 | +For more advanced use cases, configuration, and presets, see the [documentation](https://levno-710.gitbook.io/prometheus/). |
| 149 | + |
| 150 | +--- |
| 151 | + |
| 152 | +## Tests |
| 153 | + |
| 154 | +To run the Prometheus test suite: |
| 155 | + |
| 156 | +```bash |
| 157 | +lua ./tests.lua [--Linux] |
| 158 | +``` |
| 159 | + |
| 160 | +--- |
| 161 | + |
| 162 | +## Community |
| 163 | + |
| 164 | +Prometheus has an official Discord server: |
| 165 | + |
| 166 | +<p align="center"> |
| 167 | + <a href="https://discord.gg/U8h4d4Rf64"> |
| 168 | + <img src="https://img.shields.io/badge/Join%20the%20Discord%20Server-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Join Discord" /> |
| 169 | + </a> |
| 170 | +</p> |
| 171 | + |
| 172 | +--- |
| 173 | + |
| 174 | +## License and Commercial Use |
| 175 | + |
| 176 | +Prometheus is licensed under the **Prometheus License**, a modified MIT-style license. |
| 177 | + |
| 178 | +You are free to use, modify, and distribute this software, including for commercial purposes, under the following conditions: |
| 179 | + |
| 180 | +- Any commercial product, wrapper, or service *(including SaaS or hosted solutions)* that uses or integrates Prometheus must include clear attribution to: |
| 181 | + |
| 182 | +```text |
| 183 | +Based on Prometheus by Elias Oelschner, https://github.com/prometheus-lua/Prometheus |
| 184 | +``` |
| 185 | + |
| 186 | +- The attribution must be visible in the product’s: |
| 187 | + - UI |
| 188 | + - documentation |
| 189 | + - public website |
| 190 | +- The obfuscated output files generated by Prometheus do **not** need to include any license or copyright notice. |
| 191 | +- Derivative works and public forks must also include a statement in their README noting that they are based on Prometheus. |
| 192 | + |
| 193 | +Full license text: [Prometheus License](https://github.com/prometheus-lua/Prometheus/blob/master/LICENSE) |
| 194 | + |
| 195 | +--- |
| 196 | + |
| 197 | +<div align="center"> |
| 198 | + |
| 199 | +<img src="https://capsule-render.vercel.app/api?type=waving&height=120§ion=footer&color=gradient" /> |
| 200 | + |
| 201 | +</div> |
0 commit comments