|
@@ -0,0 +1,11 @@
|
|
|
|
+#Test internet connection via HTTP protocol
|
|
|
|
+#Developed by: Cybergavin, PythonCoder8
|
|
|
|
+#Required packages: sys (pre-installed with Python 3), requests
|
|
|
|
+from sys import argv
|
|
|
|
+import requests
|
|
|
|
+requests.packages.urllib3.disable_warnings()
|
|
|
|
+try:
|
|
|
|
+ r = requests.get(argv[1], verify=False)
|
|
|
|
+ print('Succeeded to connect to "%s"'%(argv[1]))
|
|
|
|
+except:
|
|
|
|
+ print('Failed to connect to "%s"'%(argv[1]))
|