How testingknowledge/bot-obfuscator works
The product is a Discord bot that accepts an attached Lua file, invokes the bundled Prometheus obfuscator with a selected preset, and returns the result; optional load mode publishes it to GitHub and returns a loadstring. The README also documents a health endpoint. The bot workflow is supported by sampled bot.py; the bundled engine’s detailed internal call wiring was not sampled, so its stages are shown conservatively.
Main entry points: bot.py Message processing · cli.lua Prometheus CLI · pipeline.lua Transformation pipeline · config.lua Preset configuration
Components 19
Discord workflow
- Command handler
bot.py - Message processing
bot.py - Lua attachment
bot.py - Temporary work files
bot.py - Prometheus runner
bot.py - Obfuscated Lua
bot.py
Obfuscation engine
- Prometheus CLI
prometheus/cli.lua - Preset configuration
prometheus/src/config.lua - Lua parsing
prometheus/src/prometheus/parser.lua - Transformation pipeline
prometheus/src/prometheus/pipeline.lua - Obfuscation steps
prometheus/src/prometheus/steps - Code generation
prometheus/src/prometheus/compiler/compiler.lua - Lua output
prometheus/src/prometheus/unparser.lua
Publishing and health
- GitHub repository
- GitHub publisher
bot.py - Health endpoint
bot.py
Other components
- Discord user
- Discord
- Health monitor
Connections 19
- Discord user → Discord: sends command
- Discord → Command handler: dispatches
- Command handler → Message processing: calls
- Message processing → Lua attachment: validates and saves
- Message processing → Temporary work files: writes work files
- Message processing → Prometheus runner: invokes
- Prometheus runner → Prometheus CLI: runs
- Prometheus CLI → Preset configuration: loads preset
- Prometheus CLI → Lua parsing: obfuscates input
- Prometheus CLI → Transformation pipeline: applies transformations
- Transformation pipeline → Obfuscation steps: applies steps
- Prometheus CLI → Code generation: generates code
- Prometheus CLI → Lua output: writes Lua output
- Message processing → GitHub publisher: load mode invokes
- GitHub publisher → GitHub repository: uploads output
- Message processing → Obfuscated Lua: returns file or loadstring
- Obfuscated Lua → Discord: replies with result
- Health monitor → Health endpoint: requests status
- Health endpoint → Health monitor: returns readiness