A powerful and intelligent extension for creating, editing, and running Nmap Scripting Engine (NSE) scripts.
Turn your VS Code into a full-fledged IDE for Nmap scripting!
✨ Features
Smart Syntax Highlighting: Full support for Lua syntax plus specific NSE fields (description, portrule, action, categories, etc.).
Interactive Snippets: Quickly scaffold scripts with nseskel, nse-http, nse-socket, and more. Just type the prefix and press Tab.
IntelliSense & Auto-completion: Type nmap., stdnse., http., or shortport. to get instant function suggestions.
Hover Documentation: Hover over core NSE functions (like nmap.new_socket) to read inline documentation and examples.
Smart Diagnostics: Real-time validation in the Problems panel. Never forget a portrule or action again!
One-Click Quick Fixes:
Empty file? Click the 💡 lightbulb (Ctrl+.) to generate a complete, well-commented script template.
Missing a field? The extension will offer to generate author, categories, portrule, or action interactively.
Auto-Require: When you insert an HTTP or Socket template, the extension automatically adds local http = require "http" or local nmap = require "nmap" to the top of your file.
Run Scripts Instantly: Click the ▶️ Play button in the editor title bar to run your script against a target directly from VS Code.
Localization: Full support for English and Russian languages (based on your VS Code UI language).
Lua Language Server Integration: Automatically detects and recommends installing the sumneko.lua extension for the ultimate coding experience.
🚀 How to Use
Create a new file with the .nse extension.
Use the snippets (nseskel) or click the 💡 lightbulb to generate a template.
Write your logic inside the action function.
Click the ▶️ Play button in the top right corner to run the script.
Enter the target IP and any extra Nmap arguments (e.g., -sU -p 1234).
⚙️ Extension Settings
This extension contributes the following settings:
nse.nmapPath: Path to the Nmap executable (default: "nmap"). Change this if Nmap is not in your system PATH.
nse.defaultArguments: Default arguments passed to Nmap when running a script (default: "-sV").
📋 Requirements
Nmap: Must be installed on your system to run the scripts.
Lua Extension (Recommended): For advanced Lua syntax checking and code navigation, install the Lua extension by sumneko.
🤝 Contributing
Found a bug or have a feature request? Feel free to open an issue in the GitHub repository.