Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ A clear and concise description of what you expected to happen.
**To Reproduce**
Steps to reproduce the behavior:

If your problem is a non-working obfuscated file, please also include a minimal source code example, your config file as well as the output file that you got.
Please include:
- A **minimal reproducible example** shared via the Prometheus Web playground: https://prometheus-lua.github.io/Prometheus/
- Your config (preset/custom config)
- The produced output (or relevant excerpt/error)

If your problem is a non-working obfuscated file, the minimal source code example is required.

**Screenshots**
If applicable, add screenshots to help explain your problem.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build web
run: pnpm --filter web build
- name: Build web + docs
run: pnpm run web:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ node_modules
web/node_modules
web/dist
web/dist-ssr
web/public/docs
web/test-results
web/playwright-report
.vite
Expand Down
35 changes: 35 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Contributing to Prometheus

Thanks for contributing to Prometheus.

## Requirements

- Keep pull requests focused and small where possible.
- Follow the existing project style and structure.
- Ensure your changes do not break existing tests and behavior.
- Add or update tests when changing behavior.
- Document user-visible changes clearly.

## Reporting Bugs

When opening a bug report, include:

- Clear bug description
- Expected behavior
- Steps to reproduce
- A minimal reproducible example shared via the Prometheus Web playground: https://prometheus-lua.github.io/Prometheus/
- Config used (preset/custom config)
- Produced output and relevant errors/logs
- Environment details (OS, Lua/LuaJIT version)

Bug reports without a reproducible minimal example may be closed until reproducible information is provided.

## Contributing New Steps / Features

If a new step or feature might break existing scripts:

- It must be clearly documented as potentially breaking.
- It must not be added to any default pipeline.
- It should only be available through custom configuration.

When proposing such a change, include migration guidance and examples for users.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,13 @@ Focused on real obfuscation passes useful for shipped Lua applications.
You can find the full documentation, including the getting started guide, here:

<p align="center">
<a href="https://levno-710.gitbook.io/prometheus">
<img src="https://img.shields.io/badge/Documentation-Read%20the%20Docs-111111?style=for-the-badge&logo=gitbook&logoColor=white" alt="Documentation" />
<a href="https://prometheus-lua.github.io/Prometheus/docs/">
<img src="https://img.shields.io/badge/Documentation-Read%20the%20Docs-111111?style=for-the-badge&logo=readthedocs&logoColor=white" alt="Documentation" />
</a>
</p>

Contribution guidelines: [CONTRIBUTING.md](CONTRIBUTING.md)

---

### Requirements
Expand Down Expand Up @@ -167,7 +169,7 @@ return(function(...)local L={"afT6mf1V","/7mJXsuvmE1c/fT3";"tn1ZSn6=","37ghSJM="
-- remaining obfuscated output omitted
```

For more advanced use cases, configuration, and presets, see the [documentation](https://levno-710.gitbook.io/prometheus/).
For more advanced use cases, configuration, and presets, see the [documentation](https://prometheus-lua.github.io/Prometheus/docs/).

---

Expand Down
35 changes: 30 additions & 5 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@
---
description: Prometheus is an Lua Obfuscator, that is written in pure Lua.
description: Prometheus is a Lua obfuscator written in pure Lua.
---

# Prometheus
# Prometheus Documentation

Prometheus can obfuscate Lua51 as well as Roblox's LuaU, which is an optionally typed superset of Lua51.
Prometheus obfuscates Lua source code using AST transforms and a configurable pipeline.

View Prometheus on [github](https://github.com/levno-710/Prometheus).
Use the [Prometheus Webapp](https://prometheus-lua.github.io/Prometheus/) to quickly try out settings and test small snippets. For larger scripts and advanced workflows, use the CLI (`prometheus-lua` or `cli.lua`).

This Documentation only applies to the newest version of Prometheus.
This documentation covers:

- CLI usage (`prometheus-lua` and `cli.lua`)
- configuration and presets
- all built-in obfuscation steps
- embedding Prometheus as a library

## Who this is for

- Lua developers shipping scripts where source readability is a concern
- users integrating Prometheus in build pipelines
- developers embedding Prometheus into another Lua application

## Supported language targets

- Lua 5.1 (`Lua51`)
- LuaU (`LuaU`)

## Read in this order

1. Installation
2. Quickstart
3. CLI Usage
4. Presets
5. Custom Config
6. Step Reference
51 changes: 30 additions & 21 deletions doc/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
# Table of contents

* [Prometheus](README.md)
* [Prometheus Documentation](README.md)

## Getting Started

* [Installation](getting-started/installation.md)
* [Obfuscating your first script](getting-started/obfuscating-your-first-script.md)
* [Command Line Options](getting-started/command-line-options.md)
* [Presets](getting-started/presets.md)
* [Writing a custom Config File](getting-started/writing-a-custom-config-file.md)
* [The Config Object](getting-started/the-config-object.md)

## Steps

* [WrapInFunction](steps/wrapinfunction.md)
* [Vmify](steps/vmify.md)
* [SplitStrings](steps/splitstrings.md)
* [ProxifyLocals](steps/proxifylocals.md)
* [EncryptStrings](steps/encryptstrings.md)
* [ConstantArray](steps/constantarray.md)
* [AntiTamper](steps/anti-tamper.md)


## advanced

* [Using Prometheus in your Lua Application](advanced/using-prometheus-in-your-lua-application.md)
* [Quickstart: First Obfuscation](getting-started/quickstart-first-obfuscation.md)
* [Troubleshooting](getting-started/troubleshooting.md)

## Guides

* [CLI Usage](guides/cli-usage.md)
* [Presets](guides/presets.md)
* [Writing a Custom Config](guides/writing-a-custom-config.md)
* [Using Prometheus as a Library](guides/using-as-a-library.md)

## Reference

* [CLI Options Reference](reference/cli-options.md)
* [Config Object Reference](reference/config-object.md)
* [Step Pipeline Overview](reference/steps/overview.md)
* [Step: WrapInFunction](reference/steps/wrapinfunction.md)
* [Step: Vmify](reference/steps/vmify.md)
* [Step: SplitStrings](reference/steps/splitstrings.md)
* [Step: ProxifyLocals](reference/steps/proxifylocals.md)
* [Step: EncryptStrings](reference/steps/encryptstrings.md)
* [Step: ConstantArray](reference/steps/constantarray.md)
* [Step: AntiTamper](reference/steps/anti-tamper.md)
* [Step: NumbersToExpressions](reference/steps/numberstoexpressions.md)
* [Step: AddVararg](reference/steps/addvararg.md)
* [Step: WatermarkCheck](reference/steps/watermarkcheck.md)

## Advanced

* [How the Pipeline Works](advanced/how-the-pipeline-works.md)
27 changes: 27 additions & 0 deletions doc/advanced/how-the-pipeline-works.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# How the Pipeline Works

Execution flow in `Pipeline:apply`:

1. Seed random generator (`Seed` or generated seed)
2. Parse source to AST
3. Apply configured steps in order
4. Rename variables
5. Unparse AST to Lua code

## Seeding details

- If `Seed > 0`: uses that fixed seed.
- Else Prometheus attempts `openssl rand -hex 12` for entropy.
- If OpenSSL is unavailable, it falls back to `os.time()` and logs a warning.

## Variable renaming

After all steps finish, Prometheus renames identifiers using:

- selected `NameGenerator`
- configured `VarNamePrefix`
- language keyword table for selected `LuaVersion`

## Logging

Pipeline emits informational logs for each phase and step timing, including output size relative to source.
31 changes: 0 additions & 31 deletions doc/advanced/using-prometheus-in-your-lua-application.md

This file was deleted.

6 changes: 6 additions & 0 deletions doc/book.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"title": "Prometheus Docs",
"styles": {
"website": "styles/website.css"
}
}
13 changes: 0 additions & 13 deletions doc/getting-started/command-line-options.md

This file was deleted.

20 changes: 13 additions & 7 deletions doc/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,38 @@

## Linux and macOS (recommended)

Install the latest release:
Install latest release:

```bash
curl -fsSL https://raw.githubusercontent.com/prometheus-lua/Prometheus/master/install.sh | sh
```

Verify:
Verify installation:

```bash
prometheus-lua --version
```

Release bundles include a Lua runtime, so no separate Lua install is needed for installed CLI usage.

Update later:

```bash
prometheus-lua update
```

The release bundle includes a Lua runtime (`runtime/lua`), so you do not need a separate Lua install for packaged CLI usage.

## From source

```bash
git clone "https://github.com/prometheus-lua/Prometheus.git"
git clone https://github.com/prometheus-lua/Prometheus.git
cd Prometheus
./prometheus-lua --preset Medium ./your_file.lua
lua ./cli.lua --version
```

Then run obfuscation:

```bash
lua ./cli.lua --preset Medium ./your_file.lua
```

For source usage, Prometheus requires LuaJIT or Lua 5.1+.
For source usage, Prometheus expects a Lua runtime (LuaJIT, `lua5.1`, or `lua`).
50 changes: 0 additions & 50 deletions doc/getting-started/obfuscating-your-first-script.md

This file was deleted.

10 changes: 0 additions & 10 deletions doc/getting-started/presets.md

This file was deleted.

Loading
Loading