A minimal Python-based TCP port scanner for network recon and diagnostics.
Made by Sandeep Prasad Chowdhury | 🎓 Ethical Hacking Student
This tool is intended for educational purposes and authorized testing only.
Only scan systems and networks you own or have explicit permission to test.
Unauthorized port scanning may be illegal in your jurisdiction.
NetScanner is a lightweight alternative to Nmap for learning TCP scanning fundamentals. It's a great starting point for understanding how port scanning works under the hood — useful for CTFs, lab environments, and your own machines.
- 🔌 TCP connect scanning via
socket.connect_ex - 🎯 Custom port ranges — scan 1 port or all 65535
- 🌍 Domain & IP support — resolves hostnames automatically
- ⏱️ 1-second timeout per port for speed
- ⚡ Zero dependencies — pure Python standard library
git clone https://github.com/chowdhurysandeep/NetScanner.git
cd NetScanner
python NetScanner.pyExample:
Enter target (IP or domain): scanme.nmap.org
Start port: 20
End port: 100
Scanning...
[+] Port 22 is OPEN
[+] Port 80 is OPEN
Scan complete.
| Target | Notes |
|---|---|
127.0.0.1 |
Your own machine |
scanme.nmap.org |
Authorized public test target by Nmap |
| Your lab VMs | TryHackMe / HackTheBox machines |
Python 3socket— TCP connection handling
- Multi-threading for faster scans
- UDP scan support
- Service/banner grabbing
- Output to file (
.txt/.csv) - Nmap-style report formatting
Sandeep Prasad Chowdhury
🔗 LinkedIn · GitHub
MIT License — free to use, modify, and distribute.