A powerful and modern network security tool for scanning open ports on target IP addresses or domain names. Built with Python and Flask, featuring both a beautiful web interface and a terminal-based mode with fast multi-threaded scanning.
- π Fast Multi-threaded Scanning - Scans 1024 ports in seconds using 100 concurrent threads
- π Dual Interface - Choose between Web UI or Terminal mode
- π― Flexible Input - Accepts IP addresses, domain names, or full URLs
- π Auto DNS Resolution - Automatically resolves domain names to IP addresses
- π Real-time Results - See open ports as they're discovered
- π Beautiful UI - Modern, responsive web interface with gradient design
- β‘ Service Detection - Identifies services running on open ports
- π Version Detection - Attempts to grab service banners for version info
- π¨ Clean Terminal UI - Color-coded ASCII art interface for terminal mode
- Python 3.7 or higher
- Flask
- colorama
- concurrent.futures (included in Python 3.2+)
- Clone or download this repository
git clone <repository-url>
cd python_tool- Install required packages
pip install flask coloramapython portScanner_Web.pyWhen you run the application, you'll be prompted to choose a mode:
ββββββββββββββββββββββββββββββββββββββββ
β PORT SCANNER TOOL β
ββββββββββββββββββββββββββββββββββββββββ
Select Mode:
[1] Terminal Mode
[2] Web UI Mode
Enter your choice (1 or 2):
Perfect for quick scans and command-line enthusiasts
- Select option
1 - Enter target IP address or domain name:
- IP:
192.168.1.1 - Domain:
google.com - URL:
https://github.com
- IP:
- Watch real-time scanning progress
- View results with scan duration
Example:
π― Enter target IP or website URL: google.com
β‘ Fast scanning ports on google.com...
π Resolving google.com β 142.250.185.46
β‘ Fast scanning 1024 ports...
β Found open port: 80 (http)
β Found open port: 443 (https)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Scan Complete! Found 2 open port(s)
β Scan Duration: 3.45 seconds
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββBest for detailed analysis and visual experience
- Select option
2 - Open your browser and navigate to:
- Local:
http://127.0.0.1:5000/ - Network:
http://YOUR_LOCAL_IP:5000/
- Local:
- Enter target IP or domain in the web form
- Click "π Start Scanning"
- View beautifully formatted results
Features:
- Responsive design (works on mobile!)
- Gradient purple theme
- Animated port results
- Service and version information for each port
- Total open ports summary
- DNS resolution display
| Format | Example | Description |
|---|---|---|
| IPv4 Address | 192.168.1.1 |
Direct IP address |
| Domain Name | google.com |
Will be resolved to IP |
| Subdomain | mail.google.com |
Subdomains supported |
| Full URL | https://github.com |
Protocol and path stripped automatically |
| Personal Domain | soundharesh.me |
Any valid domain |
Edit portScanner_Web.py to customize:
Port Range:
ports_to_scan = range(1, 1025) # Change to scan more/fewer portsThread Count:
with ThreadPoolExecutor(max_workers=100) as executor: # Adjust worker countTimeout:
sock.settimeout(0.2) # Increase for slower networksWeb Server Port:
app.run(host="0.0.0.0", port=5000, debug=False) # Change port numberpython_tool/
βββ portScanner_Web.py # Main application file
βββ templates/
β βββ index.html # Web UI template
βββ README.md # This file
Main Interface:
- Modern gradient background (purple to violet)
- Clean input form with placeholder text
- Info box showing scan mode details
Results Display:
- Color-coded port items
- Hover effects on port cards
- Status badges for open ports
- Summary card with total count
- Sequential Scanning: ~8-10 minutes for 1024 ports
- Multi-threaded Scanning: ~10-30 seconds for 1024 ports
- Speed Improvement: ~50-100x faster!
This tool is designed for educational purposes and authorized security testing only.
You should only scan:
- Your own systems and networks
- Systems you have explicit written permission to test
- Networks where you are the administrator
Unauthorized port scanning may be:
- Illegal in your jurisdiction
- Violation of computer fraud laws
- Against terms of service of hosting providers
Use responsibly and ethically!
Issue: "No module named 'flask'"
Solution: pip install flaskIssue: "No module named 'colorama'"
Solution: pip install coloramaIssue: Web UI not accessible from other devices
Solution: Check firewall settings and ensure port 5000 is openIssue: Scanning is slow
Solution: Reduce port range or increase timeout valueIssue: DNS resolution fails
Solution: Check internet connection and DNS settings- Export results to CSV/JSON
- Scan history and saved results
- Custom port range selection in UI
- OS detection
- Vulnerability database integration
- Multiple target scanning
- Scheduled scans
- Email notifications
- API endpoint for automation
Developed by Eshwar
This project is open source and available under the MIT License.
Contributions, issues, and feature requests are welcome!
If you have any questions or need help, feel free to open an issue.
Happy Scanning! πβ¨