A Proof of Concept multithreaded port scanner written in Python for cybersecurity education and authorized penetration testing.
╔════════════════════════════════════════════════════════════════════╗
║ ██████╗ ██████╗ ██████╗ ████████╗ ║
║ ██╔══██╗██╔═══██╗██╔══██╗╚══██╔══╝ ║
║ ██████╔╝██║ ██║██████╔╝ ██║ ║
║ ██╔═══╝ ██║ ██║██╔══██╗ ██║ ║
║ ██║ ╚██████╔╝██║ ██║ ██║ ║
║ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ║
║ ║
║ ███████╗ ██████╗ █████╗ ███╗ ██╗███╗ ██╗███████╗██████╗ ║
║ ██╔════╝██╔════╝██╔══██╗████╗ ██║████╗ ██║██╔════╝██╔══██╗ ║
║ ███████╗██║ ███████║██╔██╗ ██║██╔██╗ ██║█████╗ ██████╔╝ ║
║ ╚════██║██║ ██╔══██║██║╚██╗██║██║╚██╗██║██╔══╝ ██╔══██╗ ║
║ ███████║╚██████╗██║ ██║██║ ╚████║██║ ╚████║███████╗██║ ██║ ║
║ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ║
╚════════════════════════════════════════════════════════════════════╝
IMPORTANT: This tool is provided for educational and authorized security testing purposes ONLY.
- ❌ DO NOT use this tool on systems you don't own or don't have explicit written permission to scan
- ❌ Unauthorized port scanning is illegal in many jurisdictions
- ❌ The author is NOT responsible for any misuse or damage caused by this tool
- ✅ Always obtain proper authorization before scanning any network or system
- ✅ Use this tool responsibly and ethically
By using this tool, you agree to use it only for legal and authorized purposes.
- 🚀 Multithreaded scanning - Fast parallel port scanning with configurable threads
- 🎯 Multiple scan modes - Common ports, port ranges, or full 65535 port scan
- 📡 Banner grabbing - Attempts to identify services by grabbing banners
- 🔍 Service detection - Identifies well-known services (HTTP, SSH, FTP, etc.)
- 📊 Clean output - Colored terminal output with summary table
- 💾 Export results - Save scan results to a file
- ⚡ Configurable timeout - Adjust connection timeout for different network conditions
- Python 3.7 or higher
- No external dependencies (uses only Python standard library)
git clone https://github.com/Ilias1988/port-scanner-poc.git
cd port-scanner-poc# Windows
python -m venv venv
venv\Scripts\activate
# Linux/macOS
python3 -m venv venv
source venv/bin/activatepip install -r requirements.txtpython port_scanner.py -t <target> -p <ports>| Argument | Short | Description | Default |
|---|---|---|---|
--target |
-t |
Target IP address or hostname | Required |
--ports |
-p |
Ports to scan | common |
--threads |
-T |
Number of threads | 100 |
--timeout |
Connection timeout (seconds) | 1.0 |
|
--output |
-o |
Save results to file | None |
| Option | Description |
|---|---|
common |
Well-known ports (21, 22, 23, 25, 53, 80, 110, 443, etc.) |
top100 |
Ports 1-100 + well-known ports |
all |
All ports (1-65535) - |
1-1000 |
Port range (e.g., 1 to 1000) |
80,443,8080 |
Specific ports (comma-separated) |
python port_scanner.py -t 192.168.1.1 -p commonpython port_scanner.py -t 192.168.1.1 -p 1-1000python port_scanner.py -t 192.168.1.1 -p 80,443,8080,3306python port_scanner.py -t 192.168.1.1 -p common -T 200 -o results.txtpython port_scanner.py -t localhost -p top100python port_scanner.py -t 10.0.0.1 -p common --timeout 2.0============================================================
🔍 PORT SCANNER - Cybersecurity POC
============================================================
Target: 192.168.1.1 (192.168.1.1)
Ports: 25 ports to scan
Threads: 100
Timeout: 1.0s
Start Time: 2024-01-15 22:30:45
────────────────────────────────────────────────────────────
Scanning in progress...
[+] Port 22 - OPEN - SSH
[+] Port 80 - OPEN - HTTP
[+] Port 443 - OPEN - HTTPS
────────────────────────────────────────────────────────────
✅ Scan Completed!
End Time: 2024-01-15 22:30:47
📊 Open Ports Summary:
Found 3 open ports
──────────────────────────────────────────────────
│ Port │ Service │ Status │
──────────────────────────────────────────────────
│ 22 │ SSH │ OPEN │
│ 80 │ HTTP │ OPEN │
│ 443 │ HTTPS │ OPEN │
──────────────────────────────────────────────────
============================================================
| Port | Service | Port | Service |
|---|---|---|---|
| 21 | FTP | 445 | SMB |
| 22 | SSH | 993 | IMAPS |
| 23 | Telnet | 995 | POP3S |
| 25 | SMTP | 1433 | MSSQL |
| 53 | DNS | 1521 | Oracle |
| 80 | HTTP | 3306 | MySQL |
| 110 | POP3 | 3389 | RDP |
| 111 | RPC | 5432 | PostgreSQL |
| 135 | MSRPC | 5900 | VNC |
| 139 | NetBIOS | 6379 | Redis |
| 143 | IMAP | 8080 | HTTP-Proxy |
| 443 | HTTPS | 27017 | MongoDB |
- Always get authorization before scanning any network
- Document your testing and keep records of permission
- Use responsibly - don't scan networks you don't own
- Respect rate limits - excessive scanning can disrupt services
- Report vulnerabilities responsibly to system owners
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For questions or suggestions, please open an issue on GitHub.