A simple Python-based TCP port scanner for discovering open ports on a target host.
Port Scanner is a lightweight Python application that scans a target host for open TCP ports within a specified range.
Built using Python's socket programming capabilities, the scanner supports both IPv4 and IPv6 addresses, offers interactive and command-line execution modes, and provides detailed scan results along with total scan duration.
This project is ideal for learning networking concepts, cybersecurity fundamentals, and port discovery techniques.
- ๐ Host Scanning โ Scan hostnames, IPv4, and IPv6 addresses
- ๐ถ Custom Port Range โ Specify start and end ports
- โก Fast TCP Port Detection โ Uses socket-based connections
- ๐ IPv4 & IPv6 Support
- โจ๏ธ Command-Line Mode
- ๐ฑ๏ธ Interactive Mode
- ๐ก๏ธ Input Validation & Error Handling
- โฑ๏ธ Scan Duration Reporting
- Python 3.x
- Socket Programming
- TCP Networking
PORT-SCANNER/
โโโ port_scanner.py # Main scanner application
โโโ README.md # Documentation
git clone https://github.com/HimanshuKumarRout/PORT-SCANNER.git
cd port-scannerpython port_scanner.py <target> <start_port> <end_port>Example:
python port_scanner.py example.com 1 1024python port_scanner.pyThen enter:
- Target hostname or IP address
- Starting port
- Ending port
Scanning host: example.com
Port 80 is OPEN
Port 443 is OPEN
Scan completed in 2.146 seconds
- Port numbers must be between 1 and 65535
- Starting port must be less than or equal to the ending port
- Large port ranges may take additional time to scan
- Results depend on network accessibility and firewall configurations
- ๐ Multi-threaded scanning
- ๐ Export results to CSV or JSON
- ๐จ GUI-based scanner interface
- ๐ Service detection on open ports
- ๐ UDP port scanning support
- ๐ก Banner grabbing functionality
Contributions are welcome!
- Fork the repository
- Create a branch (
feature/new-feature) - Commit your changes
- Push to your branch
- Open a Pull Request
Himanshu Kumar Rout
- GitHub: https://github.com/HimanshuKumarRout
- Email: himanshurout136@gmail.com
If you like this project, please star โญ the repository and share it!
Built with ๐ using Python & Socket Programming