Init check ping

This commit is contained in:
Justin 2024-07-16 21:06:14 +00:00
parent 2f123e1d89
commit c1aa2e0072
2 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# Networking
* Pinging
* Names
* Sending
* Sending Message

9
check.py Normal file
View File

@ -0,0 +1,9 @@
import os
hostname = "google.com"
response = os.system("ping -c 1 " + hostname)
if response == 0:
pingstatus = "Network Active"
else:
pingstatus = "Network Error"
print(pingstatus)