Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Nmap NSE Script SupportNew to Visual Studio Code? Get it now.
Nmap NSE Script Support

Nmap NSE Script Support

s-mpai

|
4 installs
| (0) | Free
Syntax highlighting, snippets, and diagnostics for Nmap NSE scripts
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

NSE Language Support for VS Code

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

  1. Create a new file with the .nse extension.
  2. Use the snippets (nseskel) or click the 💡 lightbulb to generate a template.
  3. Write your logic inside the action function.
  4. Click the ▶️ Play button in the top right corner to run the script.
  5. 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.


Enjoy writing NSE scripts!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft