Interactive wrapper around Nmap that makes common scans quick to run and easy to read. It prints a banner, asks for a target and ports, lets you choose a scan type (SYN, Aggressive, OS Detect, NSE vuln checks, and more), and can optionally show only the lines that contain open ports.
Note: This tool executes the local
nmapbinary. You must have Nmap installed and available on your PATH.
A). ---------------------------------------------------------------------------------------------------
B). ---------------------------------------------------------------------------------------------------
- Target + ports prompt (single port, range like
1-1000, or leave blank for all1-65535) - 12 ready-to-use scan profiles:
- SYN (stealth) scan
-sS+ OS detect-O - Aggressive scan
-A(OS + services + scripts + traceroute) - Service/version detection
-sV - NSE vulnerability scan
--script=vuln - Heartbleed test
--script=ssl-heartbleed - HTTP security headers
--script=http-security-headers - HTTP SQL injection test
--script=http-sql-injection - SMB vulnerability scan
--script=smb-vuln* - SSL/TLS ciphers
--script=ssl-enum-ciphers - Service discovery (default NSE set)
--script=default - OS detection only
-O - Custom: you type additional Nmap args (e.g.,
-sU -T4 --top-ports 200)
- SYN (stealth) scan
- Optional output filter: show only lines that contain the word "open"
- Helpful checks and messages:
- Warns if you’re not running with Administrator/root when some scans may need it
- Verifies that Nmap is installed and in PATH, with OS-specific tips
- Python 3.8+ (tested with Python 3)
- Nmap installed and on PATH
- Windows: https://nmap.org/download.html (use the official installer, then restart the terminal)
- Linux (Debian/Ubuntu):
sudo apt install nmap - Linux (RHEL/CentOS):
sudo yum install nmap - macOS (Homebrew):
brew install nmap
- Python packages:
pyfiglet,termcolor
The script you run is main_v1.7.py in this folder.
Optional, but recommended: create and use a virtual environment.
# Optional: allow the current PowerShell session to run the venv activation script
# (only needed if you see an execution policy error)
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
# Create and activate a virtual environment in .venv
python -m venv .venv
.\.venv\Scripts\Activate.ps1
# Upgrade pip and install dependencies
python -m pip install --upgrade pip
python -m pip install pyfiglet termcolor
# Run
python .\main_v1.7.pyAlternatively, if you prefer a requirements file, create one with:
# Optional alternative
python -m pip install -r requirements.txtpython3 -m venv ~/myvenv
source ~/myvenv/bin/activate
python -m pip install --upgrade pip
python -m pip install pyfiglet termcolor
python main_v1.7.py- Enter target IP or hostname:
192.168.1.10orscanme.nmap.org - Enter port or range (or leave blank for all
1-65535) - Choose a scan type (1–12)
- Choose whether to filter and show only lines containing "open"
- Read the output; warnings (if any) are shown after the main results
- Fast service/version scan on top 1000 ports:
- Select scan type
3(Service Version Detection)
- Select scan type
- Broad vulnerability sweep:
- Select scan type
4(NSE vuln scripts)
- Select scan type
- Custom UDP-focused scan:
- Select
12and enter:-sU --top-ports 200 -T4
- Select
- SYN scans (
-sS) and OS detection (-O) often require elevated privileges- Windows: run PowerShell as Administrator
- Linux/macOS: run with
sudoif the script warns about privileges
- If a scan fails or shows very few results, try rerunning with elevation
- "Nmap executable was not found"
- Install Nmap, then close and reopen your terminal
- Confirm
nmapruns from your terminal:nmap -V
- "Permission denied" or missing SYN/OS results
- Run the terminal as Administrator (Windows) or use
sudo(Linux/macOS)
- Run the terminal as Administrator (Windows) or use
- No output / only warnings
- Check firewall rules on the target and your network
- Try different timing options (e.g.,
-T3or-T4) via custom scan
Only scan systems you own or are explicitly authorized to test. Unauthorized scanning may be illegal or violate terms of service.
main_v1.7.py– interactive Nmap wrapper with multiple scan profilesmain_v1.6.py– previous iteration; deprecated in favor of v1.7, kept for referencemain_v1.1.py– earlier, simpler version (basic SYN/TCP scan)

