Created
March 6, 2015 12:50
-
-
Save andresriancho/02bbec9e734e0423adac to your computer and use it in GitHub Desktop.
onliner.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import requests | |
while 1: | |
try: | |
time.sleep(0.1) | |
except KeyboardInterrupt: | |
break | |
try: | |
response = requests.get('http://10.5.6.33/dvwa/login.php') | |
except KeyboardInterrupt: | |
break | |
except Exception, e: | |
print 'Offline ("%s")' % e | |
else: | |
print 'Online (%s)' % response.elapsed.total_seconds() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment