┌──[0xander@kali]─[~/network_scaner]
└─$ python3 main.py <target>
[+] Initializing TCP scanner...
[+] Enumerating ports...
[+] Analyzing responses...
A lightweight TCP network scanner built with Python for network discovery and security labs.
network_scaner is a simple but practical command-line tool designed to scan TCP ports on a target host, making it useful for network administration, cybersecurity labs, reconnaissance, and learning network programming with Python.
- 🔎 TCP port scanning
- 🎯 Supports IP addresses and hostnames
- 📡 Scan individual ports
- 📋 Comma-separated ports
- 🔢 Port ranges
- ⏱️ Configurable connection timeout
- ⚙️ Configurable number of workers
- 💻 Lightweight CLI interface
- 🐍 Built entirely with Python
80
80,443,8080
20-100
80,443,8000-8100
Clone the repository:
git clone https://github.com/0xander/network_scaner.git
cd network_scanerRun the scanner:
python3 main.py <target>No external dependencies are required.
python3 main.py 127.0.0.1python3 main.py 192.168.1.10 -p 20-100python3 main.py localhost -p 80,443,8080python3 main.py 192.168.1.10 -p 1-1000 -t 0.3python3 main.py 192.168.1.10 -p 1-1000 -w 30The scanner attempts to establish a TCP connection with each specified port.
┌──────────────┐
│ TARGET │
│ 192.168.1.10 │
└──────┬───────┘
│
TCP connection attempt
│
┌─────────┴─────────┐
│ │
ACCEPTED REFUSED
│ │
▼ ▼
OPEN PORT CLOSED
A successful connection indicates that the port is reachable and accepting TCP connections.
$ python3 main.py 127.0.0.1 -p 20-100
[*] Target: 127.0.0.1
[*] Ports: 20-100
[*] Timeout: 1.0s
[*] Workers: 10
[+] Port 22 OPEN
[+] Port 80 OPEN
[*] Scan completed.
This project was built as part of my journey into Python and cybersecurity, focusing on:
- TCP/IP fundamentals
- Socket programming
- Port scanning
- Network reconnaissance
- Concurrency with workers
- Command-line argument parsing
- Error handling
- Writing practical security tools
network_scaner/
│
├── main.py
├── README.md
└── LICENSE
This tool is intended for educational purposes, authorized security testing, and systems you own or have permission to test.
Do not scan networks or systems without authorization.
___ __ __ _ _ _ ____ _____ ____
/ _ \| \/ | / \ | \ | | _ \| ____| _ \
| | | | |\/| | / _ \ | \| | | | | _| | |_) |
| |_| | | | |/ ___ \| |\ | |_| | |___| _ <
\___/|_| |_/_/ \_\_| \_|____/|_____|_| \_\
0xander
Cybersecurity • Python • Networking
Learning systems. Breaking assumptions. Building skills.