OP 31 January, 2020 - 01:35 AM
This is a little script to check if domain names are available
Its kinda bad and not always correct
I made it in like 10mins to find a domain
but its quick and automatic
use python 3.6 or above
I have found some nice domains with it
Its kinda bad and not always correct
I made it in like 10mins to find a domain
but its quick and automatic
Code:
import requests
import time
from sys import argv
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
url = "https://www.namecheap.com/domains/whoislookup-api/{domain}.{tld}"
if len(argv) < 2:
print("Missing name")
time.sleep(5)
exit()
start = argv[1]
for tmptld in open('TLDS.txt').readlines():
tld = tmptld.lower().rstrip()
check = requests.get(url.format(domain=start, tld=tld))
if "Domain Name:" in check.text:
print(bcolors.FAIL + "Domain: " + start + "." + tld + " unavailable" + bcolors.ENDC)
elif "The queried object does not exist: " in check.text:
print(bcolors.OKGREEN + "Domain: " + start + "." + tld + " available" + bcolors.ENDC)
elif "Error code: 01044" in check.text:
print("Illegal lookup")
elif "Cannot resolve registry by tld:" in check.text:
print("Bad TLD: " + tld)
else:
print("Failed to check: " + start + "." + tld)
use python 3.6 or above
Code:
python domain.py thestartofthedomain
I have found some nice domains with it