New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

nslookup

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nslookup

a nslookup library

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

nslookup

Build Status

install

npm install nslookup

quick example

nslookup('fxck.it')
  .server('8.8.8.8') // default is 8.8.8.8
  .type('mx') // default is 'a'
  .timeout(10 * 1000) // default is 3 * 1000 ms
  .end(function (err, addrs) {
    console.log(addrs); // => ['66.6.44.4']
  });

API

nslookup

nslookup(domain) and chain with methods

nslookup(domain, function (err, addrs)). Simply query a type and use 8.8.8.8.

.server(server)

String or Object

String: .server(8.8.8.8)

Object: .server({ address: '8.8.8.8', port: 53, type: 'udp' })

.type(type)

here can be mx or a or ns

e.g.: .type('ns')

.timeout(timeout)

default is 3 * 1000 ms.

if timeout, then the NSLookupTimeoutError error would be callback.

.timeout(3 * 1000)

.end(callback)

callback = function (err, addrs)

addrs is an Array

TODO

Keywords

nslookup

FAQs

Package last updated on 05 Aug 2015

Did you know?

Socket

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