NA
navanil-das/Network_Scanner
Multithreaded Python network scanner for detecting open ports and identifying services using banner grabbing, with CLI support and JSON export.
๐ Network Scanner
A multithreaded network scanner built in Python that detects open ports and identifies running services using banner grabbing. Designed as a lightweight, modular alternative to tools like Nmap.
๐ Features
- โก Multithreaded TCP port scanning
- ๐ฏ Custom port range support
- ๐ Service detection via banner grabbing
- ๐ป Command-line interface (CLI)
- ๐ JSON export of scan results
- ๐ง Basic OS detection using TTL
๐๏ธ Project Structure
network-scanner/
โ
โโโ src/
โ โโโ scanner.py # core scanning logic
โ โโโ banner_grabber.py # service detection
โ โโโ utils.py # helpers (port parsing, OS detection)
โ
โโโ results/
โ โโโ scan_results.json # saved outputs
โ
โโโ main.py # CLI entry point
โโโ requirements.txt
โโโ README.md
โโโ .gitignore
โ๏ธ Installation
git clone https://github.com/navanil-das/network-scanner.git
cd network-scanner
pip install -r requirements.txtโถ๏ธ Usage
python main.py --target 192.168.1.10 --ports 1-1000Arguments
| Argument | Description |
|---|---|
--target |
Target IP address |
--ports |
Port range (default: 1-1024) |
๐งช Example Output
Scanning 192.168.1.10...
OS Guess: Linux
[OPEN] 22 -> SSH-2.0-OpenSSH_8.2
[OPEN] 80 -> Apache/2.4.41
[OPEN] 443 -> Unknown
Results saved to results/scan_results.json
๐ฆ Output (JSON)
{
"target": "192.168.1.10",
"open_ports": [
{"port": 22, "banner": "SSH-2.0-OpenSSH_8.2"},
{"port": 80, "banner": "Apache/2.4.41"}
]
}๐ง Concepts Used
- TCP/IP & Port Scanning
- Multithreading (I/O-bound optimization)
- Banner Grabbing
- CLI Tool Development
- JSON Serialization
โ ๏ธ Disclaimer
This tool is intended for educational purposes only.
Do not scan networks without proper authorization.
โญ Future Improvements
- UDP scanning
- Service version fingerprinting
- GUI interface
- Integration with vulnerability scanning
๐จโ๐ป Author
Navanil Das
- GitHub: https://github.com/yourusername
- LinkedIn: https://linkedin.com/in/yourprofile