Interactive demo
The web dashboard from the project, replaying a real recorded scan.
Results
| Host | Port | State | Service | Banner / software | Risk & CVEs |
|---|---|---|---|---|---|
| Press "Run demo scan". | |||||
Operating system
Changes since last scan of this target
Scan log
Features
Each part is a separate module under scanner/.
TCP connect scan
Multithreaded full-handshake scan. 1,024 ports in under a second on localhost.
SYN (half-open) scan
Raw packets with scapy: SYN, SYN-ACK, RST. The connection is never completed. Needs root.
UDP scan
Real DNS, NTP, SNMP, NetBIOS and SSDP probes, so silent services still answer.
Banner grabbing
Reads service greetings and HTTP Server: headers to identify software versions.
CVE lookup
Maps versions to CPE names, queries the NIST NVD and ranks CVEs by CVSS score.
OS fingerprinting
Combines ping TTL, TCP window size and banners, and shows the evidence for its guess.
Scan comparison
Saves every scan and reports new, closed or changed ports, as attack-surface monitoring does.
Three interfaces
Command line, Tkinter desktop GUI and a Flask web dashboard, all sharing one engine.
Run it yourself
Needs Python 3.8 or later. Only scan systems you own or have permission to test.
git clone https://github.com/naga52141/port-scanner.git cd port-scanner python3 -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate pip install -r requirements.txt python port_scanner.py 127.0.0.1 -p top -A # command line, all checks python gui.py # desktop GUI python web_app.py # dashboard at http://127.0.0.1:5050
How OS fingerprinting works
Every OS starts packets with a default TTL, and each router on the way subtracts 1.
| Initial TTL | OS family |
|---|---|
| 64 | Linux, macOS, Android, BSD |
| 128 | Windows |
| 255 | Routers and switches, Solaris |
A reply with TTL 116 most likely came from Windows (128), about
12 hops away. Banners such as OpenSSH_8.2p1 Ubuntu are stronger evidence, so
they override the TTL guess. The scanner reports its confidence and the evidence it used.