A Python-based tool that checks the status of specified ports on a localhost or private IPv4/IPv6 target.
- Validate IP addresses.
- Check manually specified ports.
- Identify open and closed ports.
- Detect connection timeouts and errors.
- Display a scan summary.
- Validate port numbers (1–65535).
- Supports multiple port checks.
- Python 3
- Socket
- IP Address
-
Clone this repository:
git clone https://github.com/pradipta-web/python-port-status-checker.git
-
Navigate to the project directory:
cd python-port-status-checker -
Run the program:
py main.py
- Enter the target IP address.
- Enter the port numbers separated by commas.
- Wait for the results.
Example:
Enter target IP address: 127.0.0.1
Enter ports to check: 22,80,443,8000
Target IP : 127.0.0.1
Total Ports: 4
Port 22 : CLOSED
Port 80 : CLOSED
Port 443 : CLOSED
Port 8000 : OPEN
SCAN SUMMARY
Open Ports : 1
Closed Ports : 3
Other Status : 0
| Status | Description |
|---|---|
| OPEN | A service accepts the connection. |
| CLOSED | The connection was refused or unsuccessful. |
| TIMEOUT | The connection attempt timed out. |
| ERROR | Another socket error occurred. |
- Python socket programming.
- IP address validation.
- TCP connection handling.
- Exception handling.
- Input validation.
This tool is intended for educational purposes and authorized testing on localhost or private networks. Only test devices and networks you own or have permission to assess.
Kinervaaa