• Stars
    star
    142
  • Rank 258,495 (Top 6 %)
  • Language
    Ruby
  • License
    ISC License
  • Created over 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

NicInfo is a smart, command-line RDAP client

Overview

Gem Version Build Status Coverage Status

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_VALUE" 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.

Features

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 1.1.1.1
# 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= 1.1.1.0 - 1.1.1.255
     |--- 1= APNIC RESEARCH ( AR302-AP )
     `--- 2= IRT-APNICRANDNET-AU ( IRT-APNICRANDNET-AU )

           [ IP NETWORK ]
                   Handle:  1.1.1.0 - 1.1.1.255
            Start Address:  1.1.1.0
              End Address:  1.1.1.255
               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:  [email protected]
                    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 protected]
                    Email:  [email protected]
                    Roles:  Abuse

# Use "nicinfo -r 1.1.1.1" to see reverse DNS information.
# Use "nicinfo 1=" to show 1.1.1.0 - 1.1.1.255
# 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/1.1.1.0/24" to directly query this resource in the future.
# Use "nicinfo -h" for help.

Live examples

nicinfo -V .
nicinfo nic.br
nicinfo nic.cz

Versions

Information about the various versions of NicInfo can be found in the CHANGE LOG on the project wiki.

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 here.

If you wish to build and test this software from source, it follows the typical Ruby development process. More information may be found here.

Getting Help

Helpful information about NicInfo (and RDAP) may be found on the project wiki.

If you have questions or need help with this software, you may use the issue tracker on GitHub or you may use the ARIN Technical Discussions mailing list (it is a very low volume list).

Demonstration Queries

Demonstration queries are available with the --demo option, which will seed the cache with results and list the available demonstration queries.

nicinfo --demo

After the cache has been seeded, you will be presented with a list of example queries which will pull information from the cache.