A simple yet powerful Python-based network scanner that discovers active hosts and scans open ports within a local network.
- Host discovery using ICMP (ping)
- TCP port scanning (quick / deep modes)
- Input validation (IP base, range, scan type)
- Scan summary (active hosts & open ports)
- Port -> service mapping (HTTP, SSH, RDP, etc.)
- JSON export with timestamped filenames
- Clean and readable terminal output
- IP base (e.g. 192.168.18.)
- IP range (e.g. 1-20)
- Scan type (quick or deep)
- Verbose mode
- Detects active hosts using ping
- Scans selected ports using sockets
- Maps open ports to known services
- Display results in terminal
- Saves full report to JSON file
======= RESULTS =======
========================
Host: 192.168.0.1
------------------------
80 (HTTP)
443 (HTTPS)
========================
Host: 192.168.0.5
------------------------
No open ports
======= SUMMARY =======
Active hosts: 2
Open ports found: 2
Results saved to scan_2026-04-12_20-15-33.json
{
"scan_info": {
"base": "192.168.0.",
"range": "192.168.0.1-192.168.0.10",
"mode": "quick",
"ports_scanned": [22, 80, 443],
"verbose": false,
"timestamp": "2026-04-12 20:15:33",
"active_hosts": 2,
"total_open_ports": 2
},
"results": [
{
"ip": "192.168.0.1",
"active": true,
"open_ports": [
{
"port": 80,
"service": "HTTP"
},
{
"port": 443,
"service": "HTTPS"
}
]
}
]
}
- Python 3
subprocess(ICMP ping)socket(TCP connections)json(data export)datetime(timestamping)
- Input validation and error handling
- Working with sockets and networking basics
- Designing clean data structures
- Building CLI tools with real-world usability
- Exporting structured data (JSON)
- Improving user experience in terminal applications
- Multi-Threaded scanning (faster performance)
- CSV export
- Banner grabbing (servuce detection)
- GUI version (Tkinter or web interface)
- Custom port selection
python net-radar.py
Radoslaw Cis