Steampipe 能夠使用 SQL 查詢來查詢雲端 API。IP2Location.io Steampipe 插件使用者可以查詢 IP 地理位置資料以及 WHOIS 資料。
您只需安裝 Steampipe,然後使用以下命令安裝 IP2Location.io Steampipe 插件:
steampipe plugin install ip2location/ip2locationio
您需要一個 API 金鑰才能開始。如果您沒有,請 註冊一個免費的 API 金鑰。
您可以使用以下 SQL 查詢 WHOIS 數據:
select
domain,
domain_id,
status,
create_date
from
ip2locationio_whois
where
domain = 'google.com';
您將看到:
+------------+-------------------------+---------------------------------------------------------------------------+----------------------+ | domain | domain_id | status | create_date | +------------+-------------------------+---------------------------------------------------------------------------+----------------------+ | google.com | 2138514_DOMAIN_COM-VRSN | clientUpdateProhibited (https://www.icann.org/epp#clientUpdateProhibited) | 1997-09-15T07:00:00Z | +------------+-------------------------+---------------------------------------------------------------------------+----------------------+
有關更多信息,請參閱 IP2Location.io Steampipe 文檔。