A modern, GUI-based network security tool for scanning open ports on target hosts. Built with Python and Tkinter, featuring multi-threaded scanning for fast and efficient network reconnaissance.
- Modern GUI Interface: Clean, intuitive interface with a professional light color scheme
- Multi-threaded Scanning: Concurrent port scanning using thread pools for faster results
- Flexible Port Selection:
- Scan top 100 most common ports
- Custom port range (e.g., 1-1000)
- Specific ports (e.g., 80,443,8080)
- Service Detection: Automatic identification of common services running on open ports
- Banner Grabbing: Attempts to capture service banners for better identification
- Real-time Progress: Live progress bar and status updates during scanning
- Configurable Settings: Adjustable timeout and thread count for optimal performance
- Results Export: View scan results with color-coded open ports
- Python 3.7 or higher
- No external dependencies required (uses only Python standard library)
- Clone the repository:
git clone https://github.com/Tanmay-Bhatnagar22/port-scanner.git
cd port-scanner- Run the application:
python port_scanner.pyThat's it! No pip installations needed.
-
Launch the application:
python port_scanner.py
-
Configure your scan:
- Enter target IP address or hostname
- Set timeout (default: 1 second)
- Choose number of threads (1-200, default: 100)
- Select scan type:
- Top 100 Ports: Scans the most common ports
- Custom Range: Specify your own ports
-
Start scanning:
- Click "START SCAN" button
- Monitor progress in real-time
- View results as ports are discovered
Scanning localhost (common services):
Target: 127.0.0.1
Timeout: 1
Threads: 100
Scan Type: Top 100 Ports
Custom port range scan:
Target: example.com
Timeout: 2
Threads: 50
Scan Type: Custom Range
Custom Ports: 1-1000
Specific ports:
Target: 192.168.1.1
Timeout: 1
Threads: 10
Scan Type: Custom Range
Custom Ports: 80,443,8080,3000,8443
The tool includes scanning for the top 100 most common ports, including:
| 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 | 5900 | VNC |
| 53 | DNS | 1433 | MSSQL | 8080 | HTTP-Proxy |
And many more...
- Core Scanning: Socket-based TCP connection testing
- Threading Model:
ThreadPoolExecutorfor concurrent port scanning - GUI Framework: Tkinter with custom styling for modern appearance
- Service Detection: Port-based identification and banner grabbing
- Multi-threading: Up to 200 concurrent threads supported
- Optimized Scanning: Configurable timeout for network conditions
- Efficient Results: Real-time display of discovered open ports
- Resource Management: Proper socket cleanup and thread management
| Parameter | Description | Default | Range |
|---|---|---|---|
| Target | IP address or hostname | 127.0.0.1 | Any valid IP/hostname |
| Timeout | Connection timeout in seconds | 1 | 0.1 - 10 |
| Threads | Number of concurrent threads | 100 | 1 - 200 |
| Scan Type | Port selection method | Top 100 | Top 100 / Custom |
IMPORTANT: This tool is intended for educational purposes and authorized security testing only.
- Only scan systems you own or have explicit permission to test
- Unauthorized port scanning may be illegal in your jurisdiction
- Use responsibly and ethically
- The authors are not responsible for misuse of this tool
"Hostname could not be resolved"
- Check if the target hostname is valid
- Verify your DNS settings
- Try using an IP address instead
Slow scanning
- Increase timeout for slow networks
- Reduce number of threads
- Check your network connection
No ports found
- Verify target is reachable (try ping)
- Check firewall settings
- Increase timeout value
- Ensure target services are actually running
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by Tanmay Bhatnagar
- Inspired by tools like Nmap and Zenmap
- Built with Python's powerful standard library
- Modern UI design principles for better user experience
Clean, modern interface with easy-to-use controls and real-time progress tracking.
Note: This tool is for educational and authorized security testing purposes only. Always obtain proper authorization before scanning any network or system you do not own.