Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pw4k/ironbrew-2/llms.txt
Use this file to discover all available pages before exploring further.
Command Syntax
The basic syntax for IronBrew 2 CLI is:Path to the Lua script you want to obfuscate
How It Works
- Input: Provide a path to your Lua 5.1 script
- Processing: IronBrew 2 obfuscates the script using default settings
- Output: The obfuscated script is saved as
out.luain the current directory
File Handling
Input File
The CLI accepts a single input file path as an argument:- Be a valid Lua 5.1 script
- Exist at the specified path
- Have proper syntax (the tool validates this using
luac)
Output File
The obfuscated output is always written to:Temporary Files
The CLI creates atemp/ directory during obfuscation:
- Used for intermediate processing steps
- Automatically cleaned up before each run
- Contains compiled bytecode and transformation stages
Execution Flow
When you run the CLI, it performs these steps:- File Validation - Checks if the input file exists and is valid Lua
- Comment Stripping - Removes comments while preserving code structure
- String Encryption - Encrypts string constants in the source
- Compilation - Compiles to Lua bytecode using
luac - Obfuscation - Applies control flow and VM transformations
- Serialization - Generates the final obfuscated code
- Minification - Compresses the output for smaller file size
- Watermark - Adds IronBrew header to the output
Console Output
During execution, you’ll see progress messages:Error Handling
If an error occurs, the CLI will output:- Invalid input file path
- Syntax errors in the Lua script
- Missing dependencies (
luac,luajit) - Permission issues writing output files
Requirements
The CLI requires these external tools to be available:luac
Lua 5.1 compiler for bytecode generation
luajit
LuaJIT for running the minifier tool
Platform-Specific Paths
- Windows: Tools should be in PATH or current directory
- Linux/Unix: Tools are expected in
/usr/bin/