A standalone Windows GUI application for executing Lua code in DCS World, replacing the need for VSCode extension or web interface.
CRITICAL: This application requires DCS desanitization and may expose your system to significant security risks. Please read all warnings before proceeding.
- Removes DCS security restrictions - Allows unrestricted Lua execution
- Full system access - Scripts can access files, network, and system functions
- No sandboxing - Malicious code can damage your system or steal data
- Persistent changes - Effects remain until manually reverted
- Opens network ports - DCS Fiddle server listens on network interfaces
- Remote code execution - Anyone with access can run arbitrary Lua code on your system
- Credential vulnerabilities - Weak authentication may be bypassed
- Data exposure - Mission files and system information may be accessible remotely
- Unrestricted API access - Full DCS scripting environment exposure
- Mission interference - Can affect running missions and multiplayer sessions
- Performance impact - May cause DCS instability or crashes
- Log exposure - Sensitive information may be logged or transmitted
ONLY proceed if you:
- ✅ Understand the security implications completely
- ✅ Trust all code you plan to execute
- ✅ Use on isolated systems (not production/online gaming PCs)
- ✅ Have proper backups of your DCS installation
- ✅ Use strong authentication for remote access
- ✅ Restrict network access (firewall rules, VPN-only access)
- ✅ Monitor system activity when running unknown scripts
⛔ DO NOT USE if:
- ❌ You don't understand the technical implications
- ❌ Your Sever contains sensitive personal/work data
- ❌ You plan to run untrusted code from others
- ❌ You use the same PC for online banking/shopping
- Lua Code Editor: Syntax highlighting and line numbers for Lua code
- Local/Remote Execution: Run code on local DCS instance or remote servers
- Environment Support: Execute in Mission or GUI scripting environments
- Authentication: Username/password authentication for remote servers
- Result Formatting: Display results as Lua tables or JSON
- Settings Persistence: Save and load connection settings
- File Operations: Open, save, and manage Lua files
This application replicates the functionality of:
- Python 3.7 or higher
- DCS World with DCS Fiddle server script installed
- Required Python packages (see requirements.txt)
- Download the latest release from the
DCS_Lua_Runner_GUI_v1.0folder - Double-click
DCS_Lua_Runner_GUI.exeto start the application - Setup DCS Fiddle Server: Follow the DCS setup instructions below
- Clone or Download this repository
- Install Python dependencies:
pip install -r requirements.txt
- Run the application:
python main.py
- Setup DCS Fiddle Server: Follow the DCS setup instructions below
The following steps will DISABLE DCS security protections. This creates serious security vulnerabilities:
- 🔥 REMOVES SANDBOXING - Scripts gain full system access
- 💾 FILE SYSTEM ACCESS - Can read/write/delete any files on your computer
- 🌐 NETWORK ACCESS - Can make network connections to any server
- ⚙️ SYSTEM COMMANDS - Can execute system commands and programs
- 🔓 PERSISTENT CHANGES - Security remains disabled until manually restored
💡 SECURITY BEST PRACTICES:
- 🔒 Backup your DCS installation before proceeding
- 🏠 Use on isolated/offline systems only
- 👀 Review ALL code before execution - never run untrusted scripts
- 🔐 Use strong passwords for remote access
- 🚪 Disable when not needed - re-enable sanitization after use
- 📊 Monitor system activity while running scripts
You need to install the DCS Fiddle server script in your DCS installation:
- Download the
dcs-fiddle-server.luascript (included in this repository) - Copy to
%USERPROFILE%\Saved Games\<DCS VERSION>\Scripts\Hooks\ ⚠️ De-sanitize Mission Scripting (editDCS_INSTALL\Scripts\MissionScripting.lua):do sanitizeModule('os') sanitizeModule('io') sanitizeModule('lfs') -- _G['require'] = nil -- ⚠️ SECURITY: This enables require() function _G['loadlib'] = nil -- _G['package'] = nil -- ⚠️ SECURITY: This enables package loading end
🔄 TO RESTORE SECURITY: Uncomment these lines (remove --) when finished:
_G['require'] = nil -- Restore this line to disable require()
_G['package'] = nil -- Restore this line to disable package loadingEnabling remote access creates MAXIMUM SECURITY EXPOSURE:
- 🌍 INTERNET ACCESSIBLE - Your PC becomes accessible from anywhere on the network/internet
- 💻 REMOTE CODE EXECUTION - Anyone with credentials can run ANY Lua code on your system
- 🔓 UNSECURED BY DEFAULT - Basic authentication is easily bypassed or bruted
- 📊 DATA EXFILTRATION - All DCS data, logs, and accessible files can be stolen
- 🎯 ATTACK VECTOR - Creates entry point for malicious actors
🛡️ MANDATORY SECURITY MEASURES:
- 🔥 FIREWALL RULES - Block port 12080 from internet, allow only specific IPs
- 🔐 STRONG CREDENTIALS - Use complex passwords (20+ characters, mixed case, numbers, symbols)
- 🏠 LOCAL NETWORK ONLY - Never expose to internet (
BIND_IP = '127.0.0.1'for local only) - 📱 VPN ACCESS - Use VPN for remote access instead of direct exposure
- ⏰ TIME LIMITS - Disable when not actively needed
- 👀 MONITORING - Watch logs for unauthorized access attempts
-- SAFER: Local access only (recommended)
FIDDLE.BIND_IP = '127.0.0.1' -- Local computer only
FIDDLE.PORT = 12080
-- DANGEROUS: Network/Internet access (high risk)
FIDDLE.BIND_IP = '0.0.0.0' -- ⚠️ EXPOSES TO NETWORK/INTERNET
FIDDLE.PORT = 12080
-- MANDATORY: Strong authentication
FIDDLE.AUTH = true -- ⚠️ NEVER set to false
FIDDLE.USERNAME = 'ComplexUsername123' -- Use unique, complex username
FIDDLE.PASSWORD = 'VeryLongComplexPassword456!' -- 20+ character password🔴 NEVER DO THIS:
FIDDLE.AUTH = false -- ⚠️ NEVER disable authentication
FIDDLE.PASSWORD = 'password' -- ⚠️ NEVER use weak passwords-
Run the application:
python main.py or launch DCS_Lua_Runner_GUI.exe
-
Configure connection settings in the Settings tab:
- Server address and port
- Authentication credentials
- Execution environment preferences
- IMPORTANT: Click "Save Settings" after entering all connection details to persist your configuration
-
Write or load Lua code in the editor
-
Execute code using:
F5- Run all codeF8- Run selected code- Toolbar buttons
- Menu options
-
View results in the Results tab with syntax highlighting
- 📁 Load File: Load Lua file with options (replace, append, or insert at cursor)
- ▶ Run: Execute all code in editor
- ▶ Selected: Execute selected code only
- Local/Remote: Toggle execution target
- Mission/GUI: Toggle DCS environment
- Lua/JSON: Toggle result format
- Connection Settings: Server address, ports, HTTPS
- Authentication: Username and password for remote access
- Execution Settings: Local/remote and environment toggles
- Display Settings: Result format preferences
- Syntax highlighting for Lua code
- Line numbers
- Standard editing features (cut, copy, paste, undo)
- File operations (new, open, save)
- Timestamped execution results
- Syntax highlighting for results
- Success/error indication
- Scrollable output with clear option
Ctrl+N- New fileCtrl+O- Open fileCtrl+S- Save fileCtrl+Shift+S- Save asF5- Run codeF8- Run selected codeCtrl+X- CutCtrl+C- CopyCtrl+V- PasteCtrl+A- Select all
-- Get mission information
local mission_time = timer.getTime()
local theatre = env.mission.theatre
-- Get player information
local player = world.getPlayer()
if player then
local pos = player:getPosition().p
return {
mission_time = mission_time,
theatre = theatre,
player_name = player:getName(),
player_position = {
x = pos.x,
y = pos.y,
z = pos.z
}
}
else
return {
mission_time = mission_time,
theatre = theatre,
message = "No player found"
}
endSettings are automatically saved to dcs_lua_runner_settings.json in the application directory. This includes:
- Connection settings
- Authentication credentials
- Window size and preferences
- Execution defaults
- Verify DCS Fiddle server is running
- Check server address and port settings
- Ensure firewall allows connections (for remote access)
- Verify authentication credentials
- Check Lua syntax in the editor
- Verify DCS environment (Mission vs GUI)
- Check DCS logs for detailed error information
- Ensure Python 3.7+ is installed
- Install dependencies:
pip install -r requirements.txt - Run from the correct directory
MIT License - Based on the original DCS Fiddle project by JonathanTurnock and john681611.
- Original DCS Fiddle: JonathanTurnock and john681611
- DCS Lua Runner VSCode Extension: omltcat
- GUI Implementation: Created for standalone Windows application