Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Third Level Domains, Additional TLDs, & Bug Fixes #80

Merged
merged 9 commits into from
Jan 13, 2023

Conversation

popeeyy
Copy link
Contributor

@popeeyy popeeyy commented Dec 2, 2022

Q A
Bug fix? Yes
New feature? Yes
Deprecations? No
License MIT

Adds more queries to get whois servers with DNS if they don't exist in the IANA database. (third level domains and other obscure TLDs) Also adds support for looking up third level domains such as .co.uk. I did use optional chaining if that is an issue for supporting older node.js versions.

Also fixes .gg, .je, and .as whois results as they use new lines and have a weird registrar field. Closes #50
Now follows referral server for the RIPE database. Closes #72

@height
Copy link

height bot commented Dec 2, 2022

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@popeeyy popeeyy changed the title Third Level Domains & Additional TLDs Third Level Domains, Additional TLDs, & Bug Fixes Dec 2, 2022
Check if TLD has a whois server in the IANA database. If not, fetch it from other sources.
@AndreiIgna
Copy link
Member

hey @popeeyy thanks for this contribution. I will test it a bit more in the following days, then it will be merged and released. Thanks

@popeeyy
Copy link
Contributor Author

popeeyy commented Dec 17, 2022

There is one issue that I have not addressed and that is third level TLD WHOIS servers are not appropriately cached yet. I'm not sure what the best way to implement that would be since I don't want to accidentally query a domain as a third level domain when it's actually a normal TLD.

I'm not sure if it's even needed as DNS queries are used to get the WHOIS servers for third level domains rather than a WHOIS query.

@AndreiIgna AndreiIgna closed this Jan 13, 2023
@AndreiIgna AndreiIgna reopened this Jan 13, 2023
@AndreiIgna AndreiIgna merged commit fa09f66 into LayeredStudio:master Jan 13, 2023
@AndreiIgna
Copy link
Member

@popeeyy this is merged and included in the v1.14 release, and I'm testing it now on https://dmns.app

After testing it on a few third level domains, I think the whoisTldAlternate should not be enabled by default for third level domains.
The query with whois.iana.org returns the correct whois server for domains for 2nd or 3rd level domains:

and the whoisTldAlternate adds an extra request that returns the same WHOIS server in the end.
Have you found 3rd level domains where the basic tld whois was failing?

@popeeyy
Copy link
Contributor Author

popeeyy commented Jan 14, 2023

@AndreiIgna IANA was not returning the correct WHOIS servers at least for third level domains ending in xx.com Perhaps it could be enabled by default for those domains? I'm not sure what other endings are affected by this.

Example: roblox.ru.com

Old:
image

Updated:
image

@AndreiIgna
Copy link
Member

great, I'll add this example to the tests file, then see what works best as default options

@popeeyy
Copy link
Contributor Author

popeeyy commented Jan 18, 2023

@AndreiIgna I would make sure to add a different domain on a similar TLD as the one I listed will be thrown back into the registry soon since it was a phishing domain.

@AndreiIgna
Copy link
Member

@popeeyy after 1 week of testing on https://dmns.app/tlds & domains whois, I saw that the whoisTldAlternate is too eager to take over finding the tld whois. It works well, but in some cases discarding tld info from Iana request.

I'm making some changes in #86 to find some good defaults on when to use this function, and if you have more tlds or domains to test it against, please add them here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Follow ReferralServer whois.gg
2 participants