A blazing-fast, feature-rich network port scanner with a beautiful terminal UI
Features • Installation • Usage • Examples • Contributing
- 100x Faster than traditional scanners with multi-threading
- Scan 100+ ports per second with default settings
- Configurable worker threads (10-500+)
- Optimized connection handling with thread pooling
- Colorized terminal output for better readability
- Professional ASCII banner
- Real-time progress tracking
- Clean, intuitive result presentation
- Comprehensive scan statistics
- Service Detection - Automatically identifies 40+ common services
- Flexible Port Selection:
- Port ranges:
1-1000 - Specific ports:
22,80,443 - Combined:
1-100,443,8080-8090
- Port ranges:
- Preset Scan Modes:
- Common ports (1-1024) - Default
- Full scan (all 65535 ports)
- Top N most common ports
- Multiple formats: JSON, CSV, TXT
- Timestamped results
- Detailed scan metadata
- Easy integration with other tools
- Adjustable connection timeout
- Configurable thread count
- Quiet mode for scripting
- Banner toggle
- Flexible output options
- Python 3.6 or higher
- No external dependencies! Uses only Python standard library
git clone https://github.com/yourusername/advanced-port-scanner.git
cd advanced-port-scanner
chmod +x port_scanner.pywget https://raw.githubusercontent.com/yourusername/advanced-port-scanner/main/port_scanner.py
chmod +x port_scanner.pypython port_scanner.py -t <target> [options]| Option | Description | Default |
|---|---|---|
-t, --target |
Target IP address or hostname (required) | - |
-p, --ports |
Port range to scan | 1-1024 |
--full |
Scan all 65535 ports | False |
--top N |
Scan top N common ports | - |
-w, --workers |
Number of concurrent threads | 100 |
-T, --timeout |
Connection timeout in seconds | 1.0 |
-o, --output |
Export results to file | - |
-f, --format |
Output format (json/csv/txt) | json |
--no-banner |
Hide ASCII banner | False |
--quiet |
Minimal output (for scripting) | False |
python port_scanner.py -hScan common ports (1-1024)
python port_scanner.py -t 192.168.1.1Scan specific ports
python port_scanner.py -t example.com -p 80,443,8080Scan a port range
python port_scanner.py -t 192.168.1.1 -p 1-1000Scan top 50 most common ports
python port_scanner.py -t example.com --top 50Full port scan (all 65535 ports)
python port_scanner.py -t 192.168.1.1 --fullFast scan with 200 threads
python port_scanner.py -t example.com -p 1-10000 -w 200Custom timeout for slow networks
python port_scanner.py -t example.com -T 2.0Combined port specification
python port_scanner.py -t 192.168.1.1 -p 1-100,443,8080-8090,3306Export to JSON
python port_scanner.py -t 192.168.1.1 -o results.jsonExport to CSV
python port_scanner.py -t example.com -o results.csv -f csvExport to TXT
python port_scanner.py -t 192.168.1.1 -o results.txt -f txtQuiet mode with JSON export
python port_scanner.py -t 192.168.1.1 --quiet -o scan_$(date +%Y%m%d).jsonScan multiple targets
for ip in 192.168.1.{1..10}; do
python port_scanner.py -t $ip --quiet -o "scan_$ip.json"
doneCron job example
# Daily scan at 2 AM
0 2 * * * /usr/bin/python3 /path/to/port_scanner.py -t myserver.com --quiet -o /var/log/port_scan_$(date +\%Y\%m\%d).json╔═══════════════════════════════════════════════════════════════╗
║ ║
║ ⚡ ADVANCED PORT SCANNER v2.0 ⚡ ║
║ ║
║ Fast • Powerful • Feature-Rich ║
║ ║
╚═══════════════════════════════════════════════════════════════╝
✓ Target resolved: example.com → 93.184.216.34
⚡ Scanning 1024 ports with 100 threads...
PORT STATUS SERVICE
──────────────────────────────────────────────────
22 OPEN SSH
80 OPEN HTTP
443 OPEN HTTPS
3306 OPEN MySQL
8080 OPEN HTTP-Proxy
══════════════════════════════════════════════════
📊 SCAN SUMMARY
══════════════════════════════════════════════════
Target: example.com
Duration: 10.34 seconds
Ports Scanned: 1024
Open Ports: 5
Closed Ports: 1019
Scan Speed: 99 ports/sec
══════════════════════════════════════════════════
✓ Results exported to: results.json
The scanner automatically detects these common services:
| Port | Service | Port | Service | Port | Service |
|---|---|---|---|---|---|
| 21 | FTP | 80 | HTTP | 443 | HTTPS |
| 22 | SSH | 110 | POP3 | 3306 | MySQL |
| 23 | Telnet | 143 | IMAP | 3389 | RDP |
| 25 | SMTP | 445 | SMB | 5432 | PostgreSQL |
| 53 | DNS | 993 | IMAPS | 6379 | Redis |
And 25+ more! See the code for the complete list.
For local networks (fast)
python port_scanner.py -t 192.168.1.1 -w 200 -T 0.5For remote hosts (stable)
python port_scanner.py -t example.com -w 100 -T 1.0For slow/unreliable networks
python port_scanner.py -t example.com -w 50 -T 3.0| Scan Type | Ports | Time | Speed |
|---|---|---|---|
| Common Ports | 1,024 | ~10 sec | 100+ ports/sec |
| Extended | 10,000 | ~1.5 min | 110+ ports/sec |
| Full Scan | 65,535 | ~11 min | 100+ ports/sec |
Results may vary based on network conditions and target responsiveness
{
"target": "example.com",
"scan_time": "2025-10-01T10:30:45.123456",
"duration": 10.34,
"open_ports": [
{"port": 22, "service": "SSH"},
{"port": 80, "service": "HTTP"},
{"port": 443, "service": "HTTPS"}
],
"total_scanned": 1024
}Port,Service,Status
22,SSH,OPEN
80,HTTP,OPEN
443,HTTPS,OPEN
Port Scan Results for example.com
Scan Date: 2025-10-01 10:30:45.123456
Duration: 10.34 seconds
OPEN PORTS:
----------------------------------------
Port 22: SSH
Port 80: HTTP
Port 443: HTTPS
IMPORTANT: This tool is provided for educational purposes and authorized security testing only.
- ✅ DO: Use on your own systems or with explicit written permission
- ✅ DO: Use for legitimate security assessments and network diagnostics
- ✅ DO: Comply with all applicable laws and regulations
- ❌ DON'T: Scan systems without authorization
- ❌ DON'T: Use for malicious purposes
- ❌ DON'T: Violate any terms of service or laws
Unauthorized port scanning may be illegal in your jurisdiction. Users are solely responsible for ensuring their use complies with all applicable laws. The authors assume no liability for misuse of this tool.
We love contributions! Please read our CONTRIBUTING.md for:
- How to report bugs
- How to suggest features
- Pull request guidelines
- Code style standards
- Development workflow
# Fork and clone the repo
git clone https://github.com/yourusername/advanced-port-scanner.git
cd advanced-port-scanner
# Create a feature branch
git checkout -b feature/amazing-feature
# Make your changes and commit
git commit -m "Add: amazing new feature"
# Push and create a pull request
git push origin feature/amazing-feature- Multi-threading for blazing-fast scans
- Service detection and identification
- Export to multiple formats (JSON, CSV, TXT)
- Beautiful colorized terminal UI
- Real-time progress tracking
- Comprehensive CLI options
- UDP port scanning support
- Banner grabbing for detailed service info
- OS detection capabilities
- Stealth scan modes
- GUI interface (Tkinter/PyQt)
- IPv6 support
- Vulnerability detection
- Network mapping visualization
- Custom service definitions
- Scan profiles and templates
- API/library mode
- Docker image
Created with ❤️ by Your Name
- Nmap - The legendary network scanner
- Masscan - For speed optimization ideas
- Python Socket Programming community
Thanks to all the amazing people who have contributed to this project!
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
- Twitter: @yourhandle
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Your Name
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
If you find this project helpful, please consider:
- ⭐ Starring the repository
- 🐛 Reporting bugs and issues
- 💡 Suggesting new features
- 🤝 Contributing code
- 📢 Sharing with others
Made with 💻 and ☕