Check out this way more elegant workaround : whois.conf by Demiam
Hello there, since it’s quite a few weeks since I last posted something here, I felt like moving things up a bit.
With more than 400 new gTLDs validated by ICANN http://newgtlds.icann.org/en/ , like .sexy or even .游戏 (Chinese for games), sooner or later, you may have to lookup for whois informations related to domains using these new extensions.
I reserved recently some new gTLDs and foolishly tried to whois my new domains, let’s see what happened :
Which is absolutely normal since I didn’t mention any whois database host. To see some result, I should have written
$ whois hexa.zone -h whois.donuts.co
We could manually edit a whois.conf file and fill in servers (such as whois.donuts.co) returned by a lookup search on whois.iana.org
$ whois .zone -h whois.iana.org | grep “whois:”
But it’s not my cup of tea, adding a line for each TLD, re-editing it whenever new ones will be validated, very unpleasant in my eyes.
So I came up to this little script :
That’s all, you may copy the script in your /usr/bin/ folder then simply call
$ ewhois hexa.zone
or any other new TLD should give you a result.
Thanks for reading, and have a nice day !
Thanks Berkay for the modifications
Hey, I have a question. When using this script, the whois client only searches at the specified whois server but this sometimes is not that useful. Example: when you try to whois google.com with this, it finds out that whois.verisign-grs.com is the whois server to use but that server only has simple information about domain and registrars whois server. To get the actual information, it should query the whois.markmonitor.com. Normally, when you’re just using whois, it automatically searches the registrars whois server too but this script does not as it has a specified whois server. How could that be achieved with this?
available at https://gist.github.com/introducial/26d293936f647bbe3ccb
Thanks for the script, quite useful.
You’re very welcome.
Hey, I have a question. When using this script, the whois client only searches at the specified whois server but this sometimes is not that useful. Example: when you try to whois google.com with this, it finds out that whois.verisign-grs.com is the whois server to use but that server only has simple information about domain and registrars whois server. To get the actual information, it should query the whois.markmonitor.com. Normally, when you’re just using whois, it automatically searches the registrars whois server too but this script does not as it has a specified whois server. How could that be achieved with this?
Also, what is this script’s licence? GPLv3, MIT or something else?
Thanks.
Just to reply my own request, I found a way to do it. Anyone interested in that can go to https://gist.github.com/introducial/26d293936f647bbe3ccb
Sorry for the late reply, and thank you for mentioning me in the git. You’re totally right, nice catch on regular TLDs.
Let’s say this is under MIT licence, flexible one 😉