This is a simple port scanner implemented in Python. It scans a specified IP address for open ports within a given range.
The port scanner iterates over a specified range of ports and attempts to establish a TCP connection to each port on the target IP address. If the connection is successful, the port is considered open, and it is added to the list of open ports.
- Run the script in a Python environment.
- Enter the IP address you want to scan when prompted.
- Enter the port range in the format
min_port-max_port
when prompted. - The script will output a list of open ports on the specified IP address.
This code is provided for educational purposes only. Please use responsibly and respect applicable laws and regulations.