Init check ping

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

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
# Networking
* Pinging
* Names
* Sending
* Sending Message
+9
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)