コマンドラインでRIPEデータベースを照会する方法は?

コマンドラインでRIPEデータベースを照会する方法は?

(Fedoraから)ストックを使用すると、whoisIPアドレスに関する情報を簡単に取得できます。

$ whois SOME_IP
% This is the RIPE Database query service.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
[..]
% Information related to 'SOME_IP/SOME_AS'
route:     SOME_ROUTE
mnt-by:    SOME_STRING
[..]

「mnt-by」にSOME_STRINGを含むアイテム検索を元に戻したいと思います。

合格しました成熟したWebインターフェース

しかし、コマンドラインでこれを行う方法は?

(例:より簡単な後処理/スクリプトのため)

成熟した文書オプション-i、しかし:

$ whois.md -h riswhois.ripe.net -i mnt-by SOME_STRING
Warning: RIPE flags used with a traditional server.
[just options listing without -i]
$ jwhois -h riswhois.ripe.net -i mnt-by SOME_STRING
[Querying riswhois.ripe.net]
[riswhois.ripe.net]
% This is RIPE NCC's Routing Information Service
% whois gateway to collected BGP Routing Tables
% IPv4 or IPv6 address to origin prefix match
%
% For more information visit http://www.ripe.net/ris/riswhois.html

% ERROR: Invalid search key

そのようなクエリに別のwhoisクライアントを使用する必要がありますか?

ベストアンサー1

これ記録されたRIPE whoisオプション仕事whois.md そして正しいRIPE whoisサーバーアドレス:

$ whois.md -h whois.ripe.net -i mnt-by SOME_STRING
[..]
route:          SOME_ROUTE
descr:          SOME_DESC
origin:         SOME_AS
mnt-by:         SOME_STRING
source:         RIPE # Filtered
[.. more entries ..]

そしてGNU jwhois必ず明確に言うこれは-i ...クエリの一部でなければなりません。

$ jwhois -h whois.ripe.net -- -i mnt-by SOME_STRING
[Querying whois.ripe.net]
[whois.ripe.net]
% This is the RIPE Database query service.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
% See http://www.ripe.net/db/support/db-terms-conditions.pdf

[..]
route:          SOME_ROUTE
descr:          SOME_DESC
origin:         SOME_AS
mnt-by:         SOME_STRING
source:         RIPE # Filtered
[.. more entries ..]

参考にしてください-コマンドのフラグです。 elseはオプション-iとして解釈されますjwhois

おすすめ記事