kristovatlas / whoisalert

Receive an alert when a domain's whois record changes
7 stars 1 forks source link

whoisalert

Provide a list of domains and get an alert when WHOIS records for any of those domains changes.

Usage

$ python app.py [--simulate_change] [--simulate_cooldown n] domainlist.txt recipientlist.csv

Expects the following environment variables set:

There are two simulation options which can help you verify that your alert ought to work correctly before an alert state occurs in reality:

Either the --simulate_change option or the --simluate_cooldown option may be used, but not both simultaneously.

The first required argument (e.g. 'domainlist.txt') is a newline-separated (0x0A) text file. The second required argument (e.g. 'recipientlist.csv') is CSV file with commas that separate columns and newline that separates rows. For each row, the first value is the recipient identifier, and the second value is the communication channel. Currently, only email is supported as a communication channel.

example domainlist.txt:

google.com
yahoo.com
blockchain.info

example recipientlist.csv:

adam@example.com,email
barbara@example.com,email
charles@exaple.com,email

Requirements

Sample Output

$ python app.py domainlist.txt myemail@example.com
No changed records found for ['google.com', 'yahoo.com', 'blockchain.info']
$ python app.py --simulate_change domainlist.txt myemail@example.com
Email sent to myemail@example.com.
Attempted to send alert email after detect changed records.

Sample email generated:

Sample email generated

Cooldowns

Some WHOIS servers impose a rate limit for WHOIS queries. If you run this script too often, those servers will stop serving updated WHOIS records until a designated cooldown period expires. If this is triggered, an informational alert will be sent to your designated alert email address once. As this can create extended periods of blindness to WHOIS record updates, you should consider querying for that particular domain less frequently to avoid cooldown periods.