filmov
tv
Ping Multiple IP address using a txt file with Python script

Показать описание
#Ping to multiple IP addresses
import os
import time
import random
txt_file = input('Please enter IP addresses list text file location\n')
ip_list = open(txt_file,"r")
for ip in ip_list:
print('Pinging Now the following host IP address:',ip)
print('_'*50)
os .system('ping -n 2 -w 1500 {}'.format (ip))
print('_'*50)
import os
import time
import random
txt_file = input('Please enter IP addresses list text file location\n')
ip_list = open(txt_file,"r")
for ip in ip_list:
print('Pinging Now the following host IP address:',ip)
print('_'*50)
os .system('ping -n 2 -w 1500 {}'.format (ip))
print('_'*50)