This is a feature-rich command-line port scanner written in Python. It enables users to scan IP addresses or domain names for open ports, gather service banners, perform OS fingerprinting, and export results to JSON or CSV formats.
- ✅ Scan single targets (IP or domain)
- ✅ Subnet scanning via CIDR (e.g.,
192.168.1.0/24) - ✅ Load targets from a file (supports domains/IPs)
- ✅ TCP and UDP scanning support
- ✅ Banner grabbing from open ports
- ✅ OS fingerprinting using Nmap
- ✅ Multithreaded scanning for speed (default 100 threads)
- ✅ Export results to CSV and JSON
- ✅ Color-coded terminal output for better readability
Install the following Python packages:
pip install colorama python-nmapEnsure nmap is installed on your system and available in the system PATH:
sudo apt install nmap # Linux
brew install nmap # macOS
choco install nmap # Windows (via Chocolatey)Run the scanner with Python:
python enhanced_port_scanner.py- Scan Type: Single target / Subnet / File input
- Target: IP address or domain name, CIDR subnet, or filename
- Port Range: Starting and ending port
- Scan Protocol: TCP or UDP
- Threads: Number of concurrent scan threads
- OS Detection: Enable or skip OS fingerprinting
- Save Results: Save to
.jsonor.csv
Terminal:
[12:30:01] Scanning google.com (142.250.72.206)
[12:30:02] 142.250.72.206:80 OPEN - HTTP/1.1 Google Server
[12:30:02] [OS] 142.250.72.206 - Linux 4.X
JSON Export:
[
{
"ip": "142.250.72.206",
"port": 80,
"protocol": "TCP",
"banner": "HTTP/1.1 Google Server",
"os": "Linux 4.X"
}
]You can convert the script into a standalone executable using PyInstaller:
pip install pyinstaller
pyinstaller --onefile enhanced_port_scanner.pyThe executable will be located in the dist/ directory.
Use this tool responsibly. Only scan systems you have explicit permission to audit. Unauthorized scanning may be illegal.
Developed by [NINAD GOWDA] - Inspired by real-world network security tools.
Feel free to contribute or suggest improvements!