Primeiro commit

This commit is contained in:
Danyllo da Silva Reis
2026-03-27 20:59:08 -03:00
commit 9d22ae4060
5 changed files with 42 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import os
import utilidades
import sys
endereco = input("Digite um endereço IP: ")
if not utilidades.validar_ip(endereco):
print("O endereço IP é invalido.")
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")