Created
December 18, 2019 06:45
-
-
Save yevbar/7ea104c5ed7a028f2de2ca29fcc59e69 to your computer and use it in GitHub Desktop.
Given a TLD will search for all single letter domans that are _not_ registered
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
from string import ascii_lowercase | |
import subprocess | |
import sys | |
from time import sleep | |
tld = sys.argv[1] # ie python main.py capital | |
for c in ascii_lowercase: | |
output = subprocess.check_output("whois {}.{}".format(c, tld), shell=True) | |
if "Domain not found" in str(output): | |
print("The domain {}.{} is available".format(c, tld)) | |
sleep(0.25) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment