A simple Python script to ping a list of IP addresses and ports using TCP/IP4.
This script reads a list of IP addresses and ports from a file named servers_ip.txt, attempts to establish a TCP connection to each one, and prints the result.
- Create a file named
servers_ip.txtwith the following format:
192.168.1.1:8080
192.168.1.2:8080
192.168.1.3:8080
-
Run the script using Python 3.12 or later.
-
Result format:
192.168.1.1 :8080 | False
192.168.1.2 :8080 | False
192.168.1.3 :8080 | False
- Python 3.12 or later
This code is released under the MIT License. See LICENSE for details.