Socket
Socket
Sign inDemoInstall

geoip-kr

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    geoip-kr

lookup ip information at `http://whois.kisa.or.kr/kor/whois/openAPI_KeyCre.jsp`


Version published
Weekly downloads
1
Maintainers
1
Install size
3.92 kB
Created
Weekly downloads
 

Readme

Source

Intro

  • http://whois.kisa.or.kr/kor/whois/openAPI_KeyCreProc.jsp API를 통해 IP 또는 도메인의 실제 위치를 라이브러리 입니다.

Installation

npm install geoip-kr

Usage

  • Promise Object
const geoip = require('geoip-kr');
geoip.key('APIKEY');

geoip.lookup('203.248.252.2')
    .then((result)=> {
        console.log(result);
    })
    .catch((err)=> {
        console.log(err);
    });

geoip.lookup('whois.co.kr')
    .then((result)=> {
        console.log(result);
    })
    .catch((err)=> {
        console.log(err);
    });
  • Result Example
{
  "whois": {
    "query": "203.248.252.2",
    "queryType": "IPv4",
    "registry": "KRNIC",
    "countryCode": "KR",
    "korean": {
      "ISP": {
        "netinfo": {
          "range": "203.248.128.0 - 203.248.255.255",
          "prefix": "/17",
          "servName": "BORANET",
          "orgName": "(주)엘지유플러스",
          "orgID": "ORG572",
          "addr": "서울특별시 용산구 한강대로",
          "zipCode": "04389",
          "regDate": "20030402"
        },
        "techContact": {
          "name": "IP주소 담당자",
          "phone": "+82-2-6928-3087",
          "email": "ipadm@lguplus.co.kr"
        }
      }
    },
    "english": {
      "ISP": {
        "netinfo": {
          "range": "203.248.128.0 - 203.248.255.255",
          "prefix": "/17",
          "servName": "BORANET",
          "orgName": "LG DACOM Corporation",
          "orgID": "ORG572",
          "addr": "Seoul Yongsan-gu Hangang-daero",
          "zipCode": "04389",
          "regDate": "20030402"
        },
        "techContact": {
          "name": "IP Manager",
          "phone": "+82-2-6928-3087",
          "email": "ipadm@lguplus.co.kr"
        }
      }
    }
  }
}

Keywords

FAQs

Last updated on 12 Aug 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc