0.1.1 • Published 5 years ago

@ipdb/range v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

ipdb-range

IPIP.net database patches (IP Range of CIDR)

Free databases available for download here. If you need better accuracy you should consider buying commercial subscription.

Install

$ npm install @ipdb/range

Patches

value
range

Usage

const IPDB = require('ipdb');
const ipdb_range = require('@ipdb/range');
const ipdb = new IPDB('./data/ipipfree.ipdb', {
  patches: [ipdb_range]
});

ipdb.find('183.62.57.1');
/*
{
  code: 0,
  data: {
    country_name: '中国',
    region_name: '广东',
    city_name: '广州',
    bitmask: 18,
    range: {
      from: '183.62.0.0',
      to: '183.62.63.255',
      next: '183.62.64.0'
    },
    ip: '183.62.57.1'
  }
}
*/

Related

  • ipdb - IP lookup using IPIP.net database

License

MIT © metowolf