import subprocess
import pyfiglet
import sys
import socket
from datetime import datetime
#ping command
for ping in range(1,10):
address = "127.0.0." + str(ping)
res = subprocess.call(['ping', '-c', '3', address])
if res == 0:
print( "ping to", address, "OK")
elif res == 2:
print("no response from", address)
else:
print("ping to", address, "failed!")
Watch video Ping an Ip Address using Python online without registration, duration online in high quality. This video was added by user Russ Venti 17 September 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 64 once and liked it 0 people.