Created
October 16, 2019 20:02
-
-
Save JburkeRSAC/0854b139c0f1df26c95fe71e3ba77610 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 pythonwhois | |
| import sys | |
| def is_registered(site): | |
| details = pythonwhois.get_whois(site) | |
| return not details['raw'][0].startswith('No match for') | |
| fileName = sys.argv[1] | |
| lineList = [line.rstrip('\n') for line in open(fileName)] | |
| for name in lineList: | |
| site = '{}'.format(name) | |
| print('{}: {}'.format(site, is_registered(site))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment