使用whois命令时查询的默认whois服务器是什么?
我使用一个/etc/whois.conf文件来管理为whois命令查询的服务器。文件的内容基于这个超级用户的答案。如果我使用.com (whois.verisign-grs.com)的答案中列出的服务器,那么对向GoDaddy注册的域的所有查询都会返回一个不完整的记录。
但是,如果我注释掉了.com文件中的条目,那么GoDaddy注册域的完整whois记录将被返回。
因此,我想知道,当whois使用默认的查找设置时,询问的是哪个服务器。
发布于 2020-10-23 21:45:17
您可以使用作为调试工具的strace来查找实际使用的内容:
strace --trace=sendmmsg --verbose=all -s 64 -o whois.strace.log whois google.comwhois.strace.log
sendmmsg(3, [{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\305\300\1\0\0\1\0\0\0\0\0\1\5whois\fverisign-grs\3com\0\0\1\0\1\0\0)\4\260\0\0\0\0\0\0", iov_len=51}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=51}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\375\304\1\0\0\1\0\0\0\0\0\1\5whois\fverisign-grs\3com\0\0\34\0\1\0\0)\4\260\0\0\0\0\0\0", iov_len=51}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=51}], 2, MSG_NOSIGNAL) = 2
sendmmsg(3, [{msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="8\333\1\0\0\1\0\0\0\0\0\1\5whois\vmarkmonitor\3com\0\0\1\0\1\0\0)\4\260\0\0\0\0\0\0", iov_len=50}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=50}, {msg_hdr={msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\f\336\1\0\0\1\0\0\0\0\0\1\5whois\vmarkmonitor\3com\0\0\34\0\1\0\0)\4\260\0\0\0\0\0\0", iov_len=50}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, msg_len=50}], 2, MSG_NOSIGNAL) = 2
+++ exited with 0 +++发布于 2016-03-12 22:07:27
在调出whois的手册页时,它有以下描述:
在RFC 3912数据库中搜索对象的描述。此版本的whois客户端试图猜测正确的服务器请求指定的对象。如果无法猜测,它将连接到whois.networksolutions.com的网卡句柄或whois.arin.net的IPv4地址和网络名称。
发布于 2016-03-12 22:07:39
来自man whois:
This version of the whois client tries to guess the right server to ask
for the specified object. If no guess can be made it will connect to
whois.networksolutions.com for NIC handles or whois.arin.net for IPv4
addresses and network names.和:
If the /etc/whois.conf configuration file exists, it will be consulted
to find a server before applying the normal rules. Each line of the
file should contain a regular expression to be matched against the
query text and the whois server to use, separated by white space. IDN
domains must use the ACE format.
…
WHOIS_SERVER
This server will be queried if the program cannot guess where
some kind of objects are located. If the variable does not exist
then whois.arin.net will be queried.因此,取决于/etc/whois.conf和WHOIS_SERVER:
https://askubuntu.com/questions/745267
复制相似问题