Skip to content

Instantly share code, notes, and snippets.

@SkyBulk
Forked from ihack4falafel/BH19RegChecker.py
Created May 6, 2020 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SkyBulk/54303e2e4c1bd783eb813cb9d635cc7e to your computer and use it in GitHub Desktop.
Save SkyBulk/54303e2e4c1bd783eb813cb9d635cc7e to your computer and use it in GitHub Desktop.
Simple python script that sends a text message as soon as BH19 training page goes live!
#!/usr/bin/python
#Python script that send your phone number a text as soon as Black Hat 2019 training goes live using Twilio
#The script can be coupled with cronjob that runs every hour or whatever you may see fit
from twilio.rest import Client
import requests
account_sid = '<your Twilio account SID>'
auth_token = '<your Twilio authentication token>'
client = Client(account_sid, auth_token)
def Send(Message):
client.messages.create(
to='<your phone number>',
from_='<Twilio virtual phone number>',
body=Message,
)
def main():
message = 'Blackhat 2019 training page is live! Go register now!!'
# test case
#r = requests.get('https://www.blackhat.com/us-18/training/')
r = requests.get('https://www.blackhat.com/us-19/training/')
print r.status_code
if r.status_code != 404:
Send(message)
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment