Created by [Soumit Santra] — Advanced Security Tools
© 2026 Soumit Santra. All rights reserved.
A powerful, multi-threaded Python port scanner with advanced scanning modes, colored output, OS detection, and more.
This tool is for educational and authorized testing only!
- Obtain explicit permission before scanning any network or system.
- Unauthorized port scanning may be illegal in your jurisdiction.
- The author is not responsible for misuse or damages.
Best Practices:
- Only scan systems you own or have written permission to test.
- Check local laws and regulations.
- Use in a controlled environment when possible.
- Document all authorized testing.
- Stop scanning immediately if requested by system owners.
-
Multiple Scan Modes:
- Quick scan (common ports)
- Regular scan (ports 1–1000)
- Intense TCP scan (all ports 1–65535)
- UDP scan (common UDP ports)
- Combined TCP/UDP scan
- No-ping scan
- Custom scan (choose ports, speed, protocol, and extras)
-
Advanced Capabilities:
- OS detection (TCP/IP fingerprinting & TTL analysis)
- Service identification & banner grabbing
- Port status: open, closed, filtered
- Ping scanning
- Traceroute
- Multi-threaded for speed
- Colored output & progress bars (
colorama,tqdm) - Export results to file
- Auto-installs dependencies
- Python 3.6+
- The script will auto-install if missing:
coloramatqdmscapy
- Clone or download the repository.
- Open a terminal and navigate to the project directory.
- Run:
python port_scanner.py
The script will install any missing dependencies automatically.
- Clone or download the repository.
- Open a terminal and navigate to the project directory.
- Ensure Python 3.6+ is installed:
python3 --version
- Run:
python3 port_scanner.py
The script will install any missing dependencies automatically.
For best results (especially UDP/OS detection), run as root:
sudo python3 port_scanner.py-
Run the script and select a scan type:
1. Quick scan 2. Regular scan 3. Intense scan all TCP 4. Intense scan with UDP 5. Intense TCP + UDP scan 6. Intense scan no ping 7. Ping scan 8. Quick trace route 9. Slow comprehensive scan 10. OS scan 11. Customize scan 12. Exit -
Enter the target IP address or hostname when prompted.
-
View results in the terminal and optionally save them to a file.
The custom scan option lets you choose:
- Port range
- Scan speed (affects timeout)
- Protocol (TCP/UDP/both)
- Extras: traceroute, OS detection
- Open ports with service names & banners
- Filtered/closed ports statistics
- OS detection results (when available)
- Scan duration and statistics
- Some features (UDP scan, OS detection) require root/administrator privileges.
- UDP scanning uses Scapy if available, otherwise falls back to basic UDP socket checks.
- The script warns if not run with elevated privileges.
- Use responsibly and only on authorized systems.
This project is open-source software licensed under the MIT license.
Contributions are welcome! Please feel free to submit a Pull Request.
Soumit Santra
For questions, suggestions, or collaboration opportunities.
With great power comes great responsibility. Use this tool ethically and legally.