Simple python script for network availability check with Ping Verification

Опубликовано: 27 Декабрь 2024
на канале: CP Breeze Tech - Alchemizing Biz & Tech
63
1

#network availability check script

import os

print ("This is a network availability checker script\n")

ip_check = input("Please enter host IP or URL, sparated by space and press Enter\n").split()

for ip in ip_check:
response = os.popen (f"ping {ip}").read()
if " Received = 4" in response:
print (f"HOST IS UP {ip} Ping was Successful")
else:
print (f"HOST IS DOWN {ip} Ping was Unsuccessful")

print ("\nThank you and have a nice day!")