ommit os library

This commit is contained in:
Simon Gonçalves Costa
2026-03-27 20:47:16 -03:00
parent 548ea411b9
commit 8babc75ad0
4 changed files with 34 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import os
import utilities
import sys
endereco = input("Digite um endereço IP: ")
if not utilities.validar_ip(endereco):
print ("O endereço IP é inválido.")
sys.exit(0)
comando = f"ping {endereco}"
resultado = os.system(comando)
if not resultado:
print("O endereço existe")
else:
print("O endereço não existe")