使用stock whois
(在Fedora上)我可以轻松获取IP地址的信息:
$ 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 的条目。
我已经通过成熟的网络界面。
但如何通过命令行来做到这一点呢?
(例如,为了更轻松的后处理/脚本编写)
成熟的文件选项-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
选项。