npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

whois-rdap

v1.4.5

Published

RDAP client for RFC7482 IP WHOIS lookups supporting database-backed caching

Downloads

20

Readme

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

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.