npm.io
1.4.0 • Published 2 years ago

async-whois-dns

Licence
ISC
Version
1.4.0
Deps
1
Size
35 kB
Vulns
0
Weekly
0

async-whois-dns

Makes WHOIS, dig ns, low-level RDAP calls to be available in environments without bash commands (example AWS Lambda)

import asyncWhois from "async-whois-dns";

const result = await asyncWhois.whois(
  // This should be a string with basic latin letters only.
  "www.some.example.co.uk"
);

Installation

npm install async-whois-dns

Methods

rdap(input: string)

import asyncWhois from "async-whois-dns";

const result = await asyncWhois.rdap(
    // This should be a string with basic latin letters only.
    "www.some.example.co.uk" OR "192.168.1.1"
);

Takes a URL string or IP and tries to recover the whois information with RDAP. If failed try the whois

digNs(input: string)

import asyncWhois from "async-whois-dns";

const result = await asyncWhois.digNs(
    // This should be a string with basic latin letters only.
    "www.some.example.co.uk"
);

Takes a URL string and tries to recover the Name Server.

digMx(input: string)

import asyncWhois from "async-whois-dns";

const result = await asyncWhois.digMx(
    // This should be a string with basic latin letters only.
    "example.com"
);

Takes a URL string and tries to recover the MX Server.

digTxt(input: string)

import asyncWhois from "async-whois-dns";

const result = await asyncWhois.digTxt(
    // This should be a string with basic latin letters only.
    "example.com"
);

Takes a URL string and tries to recover the TXT Server.

ipResolver(input: string)

import asyncWhois from "async-whois-dns";

const result = await asyncWhois.ipResolver(
    // This should be a string with basic latin letters only.
    "www.some.example.co.uk"
);

Takes a URL string and tries to recover the IP address associated with it.

License

MIT

Keywords