Git Product home page Git Product logo

whois-rdap's Introduction

whois-rdap

whois-rdap is a fast, concurrent RDAP client library for the next-generation IP WHOIS lookup system supporting database-backed caching and distributed operation.

It has been deployed in production to deliver insights on network ownership, digital rights and the state of internet governance around the world.

NPM Version

Synopsis

NetBlocks

whois-rdap is a caching WHOIS client library that looks up IPv4 and IPv6 addresses and finds registry records at ARIN, RIPE etc. Only the next-generation RDAP (Registration Data Access Protocol) Query Format specified by RFC7482 and RFC7483 response format are supported, allowing for structured retrieval and processing of registrar records. All addresses are mapped to the IPv6 address space for consistency.

This package is maintained as part of the the NetBlocks.org network observation framework.

Features

  • IPv4 and IPv6 support
  • Database-backed NoSQL storage supporting schema-free queries
  • Client implementation of RFC7482 REST protocol
  • Vendor-agnostic support for RFC7483 JSON data format and extensions
  • Legacy-free with no support for classic whois queries
  • Supports IP to ASN and ASN origin queries
  • node.js library API for embedded use in servers-side JavaScript applications
  • CLI for ipwhois with optional pretty ANSI-colored console output
  • Workaround mode for RDAP server quirks

Getting started: Usage and integration

Command-line lookup utility

A basic command-line utility is included that can be used for testing or to seed and exist a deployed cache instance.

$ npm install -g whois-rdap

After installing globally the utility should be available on your PATH:

$ whois-rdap -h
Usage: whois-rdap [options] [ip ...]

Commands:
  whois-rdap  RDAP IP WHOIS client

Options:
  --version      Show version number                                   [boolean]
  -f, --force    avoid cache and force update                          [boolean]
  -v, --verbose  enable verbose debug output                           [boolean]
  -p, --pretty   pretty-print RDAP output                              [boolean]
  -h, --help     Show help                                             [boolean]

Examples:
  whois-rdap 8.8.8.8  query the specified IPv4/IPv6 address

The NetBlocks Project <https://netblocks.org>

Developer API

Installation

$ npm install whois-rdap

whois-rdap exposes a Promise-based asynchronous programming interface.

A data store instance can optionally be supplied to enable persistence and caching of results.

const whois = require('whois-rdap');

whois.check('2001:67c:4e8:fa60:3:0:811:134');
{
  "handle": "2001:67c:4e8::/48",
  "startAddress": "2001:67c:4e8::/128",
  "endAddress": "2001:67c:4e8:ffff:ffff:ffff:ffff:ffff/128",
  "ipVersion": "v6",
  "name": "Telegram_Messenger_Network",
  "type": "ASSIGNED PI",
  "country": "NL",
  "parentHandle": "EU-ZZ-2001-678",
  "entities": [
...

Tests and sources are currently the best place to look for usage examples.

Status

This library provides caching and deduplication and is used in production. The bootstrap mechanism has not yet been implemented.

whois-rdap's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.