A Discord bot designed to automate the deobfuscation of Lua scripts using MoonSec V3.
Before you begin, ensure you have the following installed:
- Python 3.8+: Download Python
- MoonSec Deobfuscator: You need the executable for the deobfuscator.
-
Clone the Repository
git clone https://github.com/daisuke1227/MoonSecV3DeobfuscatorDiscordBot.git cd MoonSecV3DeobfuscatorDiscordBot -
Install Dependencies
pip install -r requirements.txt
-
Install Moonsec Deobfuscator
git clone https://github.com/tupsutumppu/MoonsecDeobfuscator.git cd MoonsecDeobfuscator dotnet build -c Release
-
Create a
.envfile Copy theexample.env(if available) or create a new.envfile in the root directory. -
Configure Environment Variables Add the following lines to your
.envfile, replacing the placeholders with your actual paths and tokens:# Your Discord Bot Token DISCORD_TOKEN=your_discord_bot_token_here # Path to the MoonSec Deobfuscator Executable MOON_EXECUTABLE=C:\Path\To\MoonsecDeobfuscator.exe # Name of the decompression script (usually decom.lua) DECOM_SCRIPT=decom.lua
-
Run the Bot
python bot.py
-
Using the Bot in Discord
- Upload a File: Simply type in ".deobf the
.luaor.txtfile" into a channel where the bot has access. The bot will automatically download, process, and reply with the deobfuscated file. - Send a Link: Type in .deobf and the pasted link to the
.luaor.txtfile. The bot will download it and process it.
- Upload a File: Simply type in ".deobf the
- Moon Error: If you see a "Moon Error", check that the
MOON_EXECUTABLEpath in your.envfile is correct and that the deobfuscator is working independently. - Decompiled file missing: This usually means the
DECOM_SCRIPTfailed or the Lua binary path is incorrect. Check your console output for more details.