该 IP2WHOIS 命令行工具提供了一种快速有效的方式,可以访问特定域名的 WHOIS 域信息,以满足用户、网络管理员和开发人员的需求。您可以注册一个 免费 API 密钥 开始使用它。
免费开始使用Get Started for FREEIP2WHOIS 支持针对不同操作系统的多种安装方法。以下是使用 "Go Install" 方法的安装指南。
go install github.com/ip2whois/ip2whois-cli/ip2whois@latest
如需其他安装方法,请访问 IP2WHOIS GitHub 或点击下方按钮。
Windows Debian Git您需要一个 API 密钥才能开始。如果您还没有,请注册一个 免费的 IP2WHOIS API 密钥 并按照下面文档页面中的说明配置 API 密钥。
ip2whois config <API KEY>
您可以指定一个域的WHOIS手动查找该特定域的信息。结果将以JSON格式返回。
ip2whois locaproxy.com
Output
{"domain":"locaproxy.com","domain_id":"1710914405_DOMAIN_COM-VRSN","status":"clientTransferProhibited https://icann.org/epp#clientTransferProhibited","create_date":"2012-04-03T02:34:32Z","update_date":"2021-12-03T02:54:57Z","expire_date":"2024-04-03T02:34:32Z","domain_age":4301,"whois_server":"whois.godaddy.com","registrar":{"iana_id":"146","name":"GoDaddy.com, LLC","url":"https://www.godaddy.com"},"registrant":{"name":"Registration Private","organization":"Domains By Proxy, LLC","street_address":"DomainsByProxy.com","city":"Tempe","region":"Arizona","zip_code":"85284","country":"US","phone":"+1.4806242599","fax":"","email":"Select Contact Domain Holder link at https://www.godaddy.com/whois/results.aspx?domain=LOCAPROXY.COM"},"admin":{"name":"Registration Private","organization":"Domains By Proxy, LLC","street_address":"DomainsByProxy.com","city":"Tempe","region":"Arizona","zip_code":"85284","country":"US","phone":"+1.4806242599","fax":"","email":"Select Contact Domain Holder link at https://www.godaddy.com/whois/results.aspx?domain=LOCAPROXY.COM"},"tech":{"name":"Registration Private","organization":"Domains By Proxy, LLC","street_address":"DomainsByProxy.com","city":"Tempe","region":"Arizona","zip_code":"85284","country":"US","phone":"+1.4806242599","fax":"","email":"Select Contact Domain Holder link at https://www.godaddy.com/whois/results.aspx?domain=LOCAPROXY.COM"},"billing":{"name":"","organization":"","street_address":"","city":"","region":"","zip_code":"","country":"","phone":"","fax":"","email":""},"nameservers":["vera.ns.cloudflare.com","walt.ns.cloudflare.com"]}
为了提高可读性,您可以添加“-o pretty”选项以更有组织的格式显示结果,而不是一行显示。
ip2whois -o pretty locaproxy.com
Output
{
"domain": "locaproxy.com",
"domain_id": "1710914405_DOMAIN_COM-VRSN",
"status": "clientTransferProhibited https://icann.org/epp#clientTransferProhibited",
"create_date": "2012-04-03T02:34:32Z",
"update_date": "2021-12-03T02:54:57Z",
"expire_date": "2024-04-03T02:34:32Z",
"domain_age": 4301,
"whois_server": "whois.godaddy.com",
"registrar": {
"iana_id": "146",
"name": "GoDaddy.com, LLC",
"url": "https://www.godaddy.com"
},
"registrant": {
"name": "Registration Private",
"organization": "Domains By Proxy, LLC",
"street_address": "DomainsByProxy.com",
"city": "Tempe",
"region": "Arizona",
"zip_code": "85284",
"country": "US",
"phone": "+1.4806242599",
"fax": "",
"email": "Select Contact Domain Holder link at https://www.godaddy.com/whois/results.aspx?domain=LOCAPROXY.COM"
},
"admin": {
"name": "Registration Private",
"organization": "Domains By Proxy, LLC",
"street_address": "DomainsByProxy.com",
"city": "Tempe",
"region": "Arizona",
"zip_code": "85284",
"country": "US",
"phone": "+1.4806242599",
"fax": "",
"email": "Select Contact Domain Holder link at https://www.godaddy.com/whois/results.aspx?domain=LOCAPROXY.COM"
},
"tech": {
"name": "Registration Private",
"organization": "Domains By Proxy, LLC",
"street_address": "DomainsByProxy.com",
"city": "Tempe",
"region": "Arizona",
"zip_code": "85284",
"country": "US",
"phone": "+1.4806242599",
"fax": "",
"email": "Select Contact Domain Holder link at https://www.godaddy.com/whois/results.aspx?domain=LOCAPROXY.COM"
},
"billing": {
"name": "",
"organization": "",
"street_address": "",
"city": "",
"region": "",
"zip_code": "",
"country": "",
"phone": "",
"fax": "",
"email": ""
},
"nameservers": [
"vera.ns.cloudflare.com",
"walt.ns.cloudflare.com"
]
}
您可以选择自定义显示和输出特定字段,而不是显示完整的信息集。例如,下面的代码将显示域名、域名ID、状态、创建日期和注册商名称。
ip2whois -f domain,domain_id,status,create_date,registrar.name locaproxy.com
Output
domain,domain_id,status,create_date,registrar.name
"locaproxy.com","1710914405_DOMAIN_COM-VRSN","clientTransferProhibited https://icann.org/epp#clientTransferProhibited","2012-04-03T02:34:32Z","GoDaddy.com, LLC"
您可以将普通域名转换为Punycode。下面的示例使用了täst.de作为域名,您可以将其替换为您自己的域名。
ip2whois normal2puny täst.de
Output
xn--tst-qla.de
您可以将Punycode转换为正常的域名。下面的示例使用xn--tst-qla.de作为域名,您可以用自己的域名替换。
ip2whois puny2normal xn--tst-qla.de
Output
täst.de
上面的示例展示了几种使用场景。要了解更多支持的参数,您可以调用"ip2whois -h"。
寻找IP地理位置命令行工具?
IP地理位置CLI允许您检索IP地址的地理位置信息,如国家、地区、城市、域名、使用类型、代理等。