diff --git a/README.md b/README.md index ba47d8e..13992dc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # Networking * Pinging * Names -* Sending \ No newline at end of file +* Sending Message \ No newline at end of file diff --git a/check.py b/check.py new file mode 100644 index 0000000..7e96075 --- /dev/null +++ b/check.py @@ -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) \ No newline at end of file