Wouldn’t checking for DNS NS record existence be a much easier way?
Not all TLDs have Whois, but everyone uses DNS
-nick
On Thu, Jul 25, 2024 at 17:02 Scott Allen via talk <
talk@gtalug.org> wrote:
On Thu, 25 Jul 2024 at 16:38, Scott Allen <mlxxxp@gmail.com> wrote:
>> On Thu, 25 Jul 2024 at 16:27, Scott Allen <mlxxxp@gmail.com> wrote:
> > Doing a grep on whois output for "Registrar:" (perhaps case
> > insensitive) might be fairly reliable.
> Even that doesn't always work. E.g.:
> whois abc.de
> I give up (on using whois, at least).
This is assuming you want something that will work for any TLD. For a
single given TLD, the whois output should be consistent enough that
you could figure out something to determine if a domain is registered
or not.
For instance, for the .ca domain it looks like just checking the first
output line for "Not found:" is sufficient to indicate a domain hasn't
been registered.
--
Scott
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk