我似乎有一个问题的谁,它似乎是重复输出,这不幸地干扰了我的脚本之一。
我已经在我的个人笔记本电脑以及我的Ubuntu服务器上测试了这一点,我也在Ubuntu的新安装上测试了这一点。
这在我的CentOs7服务器上不是问题。不过,我还没有在不同的发行版上测试过这一点。
与CentOs相比,我对ubuntu的了解并不多,但我不认为这些实用程序之间会有那么大的差别。
下面是我运行whois时的一个示例:
╔═══[Date: Sat Apr 27 Time: 05:04 AM]═[arctic@Sevastopol.foxdale.net]
╠══[Total Commands: 977]═[Issued Commands: 4]=[Logins: 2]
╠═[~]
╚[λ]-[$]>-➤ whois foxdale.net
Domain Name: FOXDALE.NET
Registry Domain ID: 1830382905_DOMAIN_NET-VRSN
Registrar WHOIS Server: whois.namecheap.com
Registrar URL: http://www.namecheap.com
Updated Date: 2018-09-08T06:15:03Z
Creation Date: 2013-10-08T18:25:51Z
Registry Expiry Date: 2019-10-08T18:25:51Z
Registrar: NameCheap, Inc.
Registrar IANA ID: 1068
Registrar Abuse Contact Email: abuse@namecheap.com
Registrar Abuse Contact Phone: +1.6613102107
Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
Name Server: NS1.FOXDALE.NET
Name Server: NS2.FOXDALE.NET
DNSSEC: unsigned
URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
>>> Last update of whois database: 2019-04-27T10:37:41Z <<<
For more information on Whois status codes, please visit https://icann.org/epp
NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the expiration
date of the domain name registrant's agreement with the sponsoring
registrar. Users may consult the sponsoring registrar's Whois database to
view the registrar's reported date of expiration for this registration.
TERMS OF USE: You are not authorized to access or query our Whois
database through the use of electronic processes that are high-volume and
automated except as reasonably necessary to register domain names or
modify existing registrations; the Data in VeriSign Global Registry
Services' ("VeriSign") Whois database is provided by VeriSign for
information purposes only, and to assist persons in obtaining information
about or related to a domain name registration record. VeriSign does not
guarantee its accuracy. By submitting a Whois query, you agree to abide
by the following terms of use: You agree that you may use this Data only
for lawful purposes and that under no circumstances will you use this Data
to: (1) allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via e-mail, telephone,
or facsimile; or (2) enable high volume, automated, electronic processes
that apply to VeriSign (or its computer systems). The compilation,
repackaging, dissemination or other use of this Data is expressly
prohibited without the prior written consent of VeriSign. You agree not to
use electronic processes that are automated and high-volume to access or
query the Whois database except as reasonably necessary to register
domain names or modify existing registrations. VeriSign reserves the right
to restrict your access to the Whois database in its sole discretion to ensure
operational stability. VeriSign may restrict or terminate your access to the
Whois database for failure to abide by these terms of use. VeriSign
reserves the right to modify these terms at any time.
The Registry database contains ONLY .COM, .NET, .EDU domains and
Registrars.
Domain name: foxdale.net
Registry Domain ID: 1830382905_DOMAIN_NET-VRSN
Registrar WHOIS Server: whois.namecheap.com
Registrar URL: http://www.namecheap.com
Updated Date: 2018-09-08T06:15:03.74Z
Creation Date: 2013-10-08T18:25:51.00Z
Registrar Registration Expiration Date: 2019-10-08T18:25:51.00Z
Registrar: NAMECHEAP INC
Registrar IANA ID: 1068
Registrar Abuse Contact Email: abuse@namecheap.com
Registrar Abuse Contact Phone: +1.6613102107
Reseller: NAMECHEAP INC
Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
Registry Registrant ID:
Registrant Name: WhoisGuard Protected
Registrant Organization:
Registrant Street: P.O. Box 0823-03411
Registrant City: Panama
Registrant State/Province: Panama
Registrant Postal Code:
Registrant Country: PA
Registrant Phone: +507.8365503
Registrant Phone Ext:
Registrant Fax: +51.17057182
Registrant Fax Ext:
Registrant Email: f7a93f5d87af478f876ff6f51b592cb0.protect@whoisguard.com
Registry Admin ID:
Admin Name: WhoisGuard Protected
Admin Organization:
Admin Street: P.O. Box 0823-03411
Admin City: Panama
Admin State/Province: Panama
Admin Postal Code:
Admin Country: PA
Admin Phone: +507.8365503
Admin Phone Ext:
Admin Fax: +51.17057182
Admin Fax Ext:
Admin Email: f7a93f5d87af478f876ff6f51b592cb0.protect@whoisguard.com
Registry Tech ID:
Tech Name: WhoisGuard Protected
Tech Organization:
Tech Street: P.O. Box 0823-03411
Tech City: Panama
Tech State/Province: Panama
Tech Postal Code:
Tech Country: PA
Tech Phone: +507.8365503
Tech Phone Ext:
Tech Fax: +51.17057182
Tech Fax Ext:
Tech Email: f7a93f5d87af478f876ff6f51b592cb0.protect@whoisguard.com
Name Server: ns1.foxdale.net
Name Server: ns2.foxdale.net
DNSSEC: unsigned
URL of the ICANN WHOIS Data Problem Reporting System: http://wdprs.internic.net/
>>> Last update of WHOIS database: 2019-04-27T03:17:32.93Z <<<
!highlight!For more information on Whois status codes, please visit https://icann.org/epp发布于 2019-04-27 13:25:04
我在我的Ubuntu18.04机器和一个针对CentOS 7 VM的google.com上运行了这个命令,输出是不一样的,但是我没有遇到任何复制问题。相反,看起来Ubuntu实例执行了两个查询:首先是大写,然后是所有小写。时间戳还表明这是两个单独的查询。我建议在脚本中添加一个管道,如下所示:
whois foxdale.net | tail -n 60
由于CentOS输出只有60行,而前60行似乎是相同的,所以您应该能够使用它来将输出格式化为一些有用的内容。您还可以在无需修改的情况下重用CentOS机器上的脚本。
发布于 2019-04-27 14:13:03
我可以在我的拱形机器上用whois版本5.4.2来确认这种行为。看起来,whois的开发人员认为查询大写域名和小写域名都是有用的。我不明白为什么,域名实现规范(RFC 1035) 国家 (强调我):
2.3.3。作为正式协议一部分的DNS的所有部分的字符大小写,所有字符串之间的比较(例如标签、域名等)都是以不区分大小写的方式进行的。目前,这一规则在整个领域系统中毫无例外地生效。但是,将来超出当前使用范围的添加可能需要在名称中使用完整的二进制八进制功能,因此应该避免尝试将域名存储在7位ASCII中或使用特殊字节来终止标签等等。当数据进入域系统时,应尽可能保留其原始情况。在某些情况下,这是无法做到的。例如,如果两个RRs存储在数据库中,一个存储在X.Y,另一个存储在x.y,那么它们实际上存储在数据库中的同一个位置,因此只能保留一个大小写。基本规则是,只有当数据用于定义数据库中的结构时,才能丢弃大小写,而在大小写不敏感的情况下,两个名称是相同的。
鉴于以上所述,whois开发人员的决定似乎很奇怪,但我不是网络专家,所以他们可能知道一些我不知道的事情。
想必,您的CentOS有一个旧版本的whois,它没有这种行为。CentOS不是一个尖端的发行版,通常落后于其他发行版,后者更经常发布新版本的工具。因为我可以在我的Arch系统上复制这个,这看起来确实是whois开发人员做出的上游决定,而不是Ubuntu的问题。
值得注意的是,这似乎是添加到whoisv5.2.17中的,至少这是我在github存储库https://github.com/rfc1036/whois中找到的第一个版本,它显示了这种行为。
https://askubuntu.com/questions/1138607
复制相似问题