Skip to content

FurqanSoftware/node-whois

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
February 14, 2014 14:25
May 31, 2014 19:44
July 6, 2013 14:21
October 28, 2022 20:01
November 3, 2022 19:27
November 3, 2022 19:23
November 4, 2022 10:37
November 4, 2022 10:37
November 3, 2022 19:36

Node WHOIS

Build Status

Node WHOIS is a WHOIS client for Node.js.

Installation

Global

$ npm install -g whois

Usage

whois [options] address

Options:
  --version      Show version number                                   [boolean]
  -s, --server   whois server                                    [default: null]
  -f, --follow   number of times to follow redirects                [default: 0]
  -p, --proxy    SOCKS proxy                                     [default: null]
  -v, --verbose  show verbose results                 [boolean] [default: false]
  -b, --bind     bind to a local IP address                      [default: null]
  -h, --help     Show help                            [boolean] [default: false]

Local

$ npm install whois

Usage

var whois = require('whois')
whois.lookup('google.com', function(err, data) {
	console.log(data)
})

You may pass an object in between the address and the callback function to tweak the behavior of the lookup function:

{
	"server":  "",   // this can be a string ("host:port") or an object with host and port as its keys; leaving it empty makes lookup rely on servers.json
	"follow":  2,    // number of times to follow redirects
	"timeout": 0,    // socket timeout, excluding this doesn't override any default timeout value
	"verbose": false // setting this to true returns an array of responses from all servers
	"bind": null     // bind the socket to a local IP address
	"proxy": {       // (optional) SOCKS Proxy
		"host": "",
		"port": 0,
		"type": 5    // or 4
	}
}

Contributing

Contributions are welcome.

License

Node WHOIS is available under the BSD (2-Clause) License.

Other Projects Using Node WHOIS

  • Dots: Tiny networking toolkit. Uses Node WHOIS to perform WHOIS lookups for domains and IPs.

If you are using Node WHOIS in a project please send a pull request to add it to the list.