DEVNULL = subprocess.DEVNULL
result = subprocess.call(["ping", "-n", "1", "-f", host], stdout=DEVNULL)
try:
s.connect((host, port))
except socket.error:
pass
else:
s.close
print((str(port) + ' IS OPEN')