@kozakvoj/node-ip-tools
Get ASN and DNS information about IP addresses
Last updated a year ago by kozakvoj .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @kozakvoj/node-ip-tools 
SYNC missed versions from official npm registry.

Node IP Tools

Discover information about an IP address.

The currently supported services are:

  • DNS (using pn/dns module)
  • ASN (using cymru and ipstoasn services)
  • GEO (using keycdn service)

Usage

const IpTools = require("@kozakvoj/node-ip-tools");
const ipTools = new IpTools.client();

const geo = IpTools.modules.geo;
const asn = IpTools.modules.asn;
const dns = IpTools.modules.dns;

ipTools
    .use(asn)
    .use(dns)
    .use(geo);

ipTools.run("188.247.240.199")
    .then(console.log);

Response:

{  
   "asn":{  
      "countryCode":"RO",
      "ASN":39737,
      "description":"NETVISION-AS"
   },
   "dns":{  
      "hostname":"199.240.247.188.primetelecom.ro",
      "service":"http"
   },
   "geo":{  
      "host":"188.247.240.199",
      "ip":"188.247.240.199",
      "rdns":"199.240.247.188.primetelecom.ro",
      "asn":39737,
      "isp":"Net Vision Telecom SRL",
      "country_name":"Romania",
      "country_code":"RO",
      "region_name":null,
      "region_code":null,
      "city":null,
      "postal_code":null,
      "continent_name":"Europe",
      "continent_code":"EU",
      "latitude":46,
      "longitude":25,
      "metro_code":null,
      "timezone":"Europe/Bucharest",
      "datetime":"2018-08-22 23:29:25"
   }
}

Current Tags

  • 0.0.3                                ...           latest (a year ago)

3 Versions

  • 0.0.3                                ...           a year ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 3
Last Month 4
Dependencies (9)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |