Skip to content

Instantly share code, notes, and snippets.

@THEMVFFINMAN
Created September 29, 2016 01:13
Show Gist options
  • Save THEMVFFINMAN/4f0577fd39b48b405a811038c43781f5 to your computer and use it in GitHub Desktop.
Save THEMVFFINMAN/4f0577fd39b48b405a811038c43781f5 to your computer and use it in GitHub Desktop.
Army it people are tards, this sends me an email once they fix their ssl stuff
import requests
import time
def send_me_an_email():
return requests.post(
"https://api.mailgun.net/v3/sendingdomain/messages",
auth=("api", "API"),
data={"from": "CIA <[email protected]>",
"to": ["myemail", "myemail"],
"subject": "Might be up",
"text": "Might be up"})
while True:
try:
r = requests.get('https://www.lms.army.mil/Saba/ALMSCustomLogin.jsp')
if r.text:
send_me_an_email()
break
except Exception:
print "didn't work, sleeping 10"
time.sleep(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment