Provide a list of domains and get an alert when WHOIS records for any of those domains changes.
$ 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:
--simulate_change
option simulates an change to the WHOIS record so you
can verify that your alert system is working correctly.--simulate_cooldown
option simulates a reply from a WHOIS server that
enforces a cooldown period of n
seconds before it will give updated data.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
brew install whois
)$ 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:
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.