JSPM

fcrdns

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q58581F
  • License

NodeJS Forward-confirmed reverse DNS

Package Exports

  • fcrdns

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fcrdns) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

FCrDNS

NodeJS Forward-confirmed reverse DNS by Joshua Davison

What is it?

FCrDNS will check the PTR records of an IP address, and will check that there is a valid A/AAAA name entry pointing back to the DNS.

In simpler terms, it checks the hostname of the IP address, and the IP address of the hostname match.

Installation

npm install --save fcrdns

Usage:

Usage is simple, and often best shown in code...

var FCrDNS = require('fcrdns'),
    rDNS = new FCrDNS();

rDNS.get('8.8.8.8', function(hostname) {
  if (hostname === null)
    console.log('Unable to verify Google DNS hostname.');
  else
    console.log('The hostname for Google DNS is ' + hostname);
});

FCrDNS(config)

  • config <object> (not yet implemented)
    • ttl <number>

FCrDNS.get(address, callback)

  • address <string>
  • callback <Function>
    • hostname <string>
    • cached <Boolean>

Note that hostname will be null if verification failed, or if there was an error.