此 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 地址的地理位置資訊,例如國家、區域、城市、網域、使用類型、代理等。