nmap-scan-cli
v1.0.3
Published
CLI utility to perform detailed Nmap scans and save reports
Maintainers
Readme
🔍 nmap-scan-cli / automate-nmap-scan (TypeScript/Node.js)
This project automates Nmap scans from the command line, checks if nmap is installed, supports multiple scan types (service/version & OS detection), and saves the results to a nmap_results/ directory in timestamped files.
🚀 Features
- ✅ Automatically checks if Nmap is installed
- 🛠️ Supports multiple scan modes:
Service/Version Scan: nmap -sV -T4,OS Detection Scan: nmap -O - 💾 Saves the scan output to a timestamped
.txtfile - 📁 Automatically creates the
nmap_results/folder if not present - ⚠️ Handles errors cleanly (missing
nmap, scan issues, file system issues)
🧑💻 Requirements
- Node.js 18+
- Nmap installed (
apt,brew,choco, or from nmap.org)
📦 USAGE
1. Install Nmap
Ubuntu/Debian
sudo apt install nmapmacOS (Homebrew)
brew install nmapWindows (via Chocolatey)
choco install nmap2. Install the CLI tool globally
macOS / Linux
On most Unix-like systems, you might need to use sudo to install globally due to permission restrictions:
npm install -g nmap-scan-cli3. Run scans
1. service/version
nmap-sv-scan <target>2. OS detection
OS detection (nmap -O) requires administrative privileges.
- Linux/macOS: Run the command with
sudo
nmap-od-scan <target>