News for hackers. Stuff that matters.
Re:Show HN: Domain Name Search with AI by mikkom on Wednesday December 07, 2022 @02:31AM (#33891646)
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
Re:Show HN: Domain Name Search with AI by kirillzubovsky on Monday December 12, 2022 @11:08PM (#33964720)
Thanks, 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!
Re:Show HN: Domain Name Search with AI by swyx on Wednesday December 07, 2022 @10:25AM (#33895403)
dont you need to set a timeout on this in case it doesnt connect in tim?