4 ms·
I created a similar service (migtyname.com and separate personal toolkit) in the past for checking name combinations and checked the domain name availability u
by mikkom 4y ago
I created a similar service (migtyname.com and separate personal toolkit) in the past for checking name combinations and checked the domain name availability using custom code that costs nothing.
If this saves you money then I'm happy.
so drumroll..... here you are (whois.py is my project name for the file)
import socket
tld = 'whois.verisign-grs.com'
def whois(domain):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((tld, 43))
str = domain+'\n'
s.send(str.encode())
buffer = ''
while True:
data = s.recv(1024).decode()
if data:
buffer += data
else:
break
return buffer
def available(domain):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((tld, 43))
str = domain+'\n'
s.send(str.encode())
buffer = ''
data = s.recv(1024).decode()
if "No match for" in data:
return True
return False
- kirillzubovsky 4y agoThanks, I will give it a try. I am going to build a cascading approach where I will use inhouse tools to check first, and then when necessary or unclear, you other tools to verify. This would come in handy!
- swyx 4y agodont you need to set a timeout on this in case it doesnt connect in tim?