NicInfo is a general purpose, command line Registry Data Access Protocol (RDAP) client released under an open source, ISC derivative BSD style license. RDAP is an HTTP-based RESTful protocol defined by the IETF as a replacement for Whois.
The general usage of this software from the command line is "nicinfo QUERY_VALE" where the QUERY_VALUE is an IP address, domain name, autonomous system number, name server host name, or entity identifier. NicInfo will attempt to determine the most appropriate RDAP server to query and follow redirects to other RDAP servers as needed.
NicInfo has the following features:
- Query type detection: it will attempt to determine what type of query is needed based on the supplied query value.
- Plain text output: default output is a text version of the RDAP results.
- JSON output: the RDAP JSON can be passed directly to a calling program for intergration with scripts with the ability to select specific JSON values.
- Multiple output controls: the amount of text detail and process execution can be varied and sent to different files.
- A Built-in cache: RDAP queries are cached.
- Bootstrapping using the IANA bootstrap files or by using a bootstrap server.
- Demonstration queries: a set of built-in queries and results are provided for demonstration purposes.
The following is an example of using NicInfo:
$ bin/nicinfo --pager no 188.8.131.52 # NicInfo v.0.1.0-snapshot [ NOTICE ] Source 1 Objects returned came from source 2 APNIC [ NOTICE ] Terms and Conditions 1 This is the APNIC WHOIS Database query service. The objects are in RDAP format. TOS http://www.apnic.net/db/dbcopyright.html [ RESPONSE DATA ] 1= 184.108.40.206 - 220.127.116.11 |--- 1= APNIC RESEARCH ( AR302-AP ) `--- 2= IRT-APNICRANDNET-AU ( IRT-APNICRANDNET-AU ) [ IP NETWORK ] Handle: 18.104.22.168 - 22.214.171.124 Start Address: 126.96.36.199 End Address: 188.8.131.52 IP Version: v4 Country: AU Type: ASSIGNED PORTABLE Last Changed: Mon, 12 May 2014 04:16:03 -0000 Remarks: -- description -- 1: Research prefix for APNIC Labs 2: APNIC [ ENTITY ] Handle: AR302-AP Name: APNIC RESEARCH Email: firstname.lastname@example.org Phone: +61-7-3858-3188 ( voice ) Phone: +61-7-3858-3199 ( fax ) Roles: Technical, Administrative Excessive Remarks: Use "-V" or "--data extra" to see them. [ ENTITY ] Handle: IRT-APNICRANDNET-AU Name: IRT-APNICRANDNET-AU Email: email@example.com Email: firstname.lastname@example.org Roles: Abuse # Use "nicinfo -r 184.108.40.206" to see reverse DNS information. # Use "nicinfo 1=" to show 220.127.116.11 - 18.104.22.168 # Use "nicinfo 1.1=" to show APNIC RESEARCH ( AR302-AP ) # Use "nicinfo 1.2=" to show IRT-APNICRANDNET-AU ( IRT-APNICRANDNET-AU ) # Use "nicinfo http://rdap.apnic.net/ip/22.214.171.124/24" to directly query this resource in the future. # Use "nicinfo -h" for help.
nicinfo -V . nicinfo nic.br nicinfo nic.cz
Getting and Installing
Getting and installing NicInfo is easily accomplished as a Ruby Gem using the command
gem install nicinfo.
If that does not work for you, follow the instructions and advice for your platform on the project Wiki
If you wish to build and test this software from source, it follows the typical Ruby development process. More information may be found here.
Helpful information about NicInfo (and RDAP) may be found on the project wiki.
Demonstration queries are available with the --demo option, which will seed the cache with results and list the available demonstration queries.
After the cache has been seeded, you will be presented with a list of example queries which will pull information from the cache.