0.0.3 • Published 7 years ago

domain-digger v0.0.3

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

Build Status npm version Code Climate

What is it

A library for Node.JS that can be used for the following tasks:

  1. Get domain's whois info
  2. Domain DNS lookup
  3. Build a route to a domain or IP addrr (based on a traceroute utility)
  4. Scan remote service, very primitive and simple for now.

It is written using TypeScript so you can find custom data types definitions in *.d.ts files.

How to use?

var dodig = require('domain-digger');
// WHOIS
dodig
    .whois('google.com')
    .then(
        function(response) {
            console.log(response);
        }
    )
    .catch(
        function(err) {
            console.log(err);
        }
    );
// DNS LOOKUP
dodig
    .lookup('google.com')
    .then(
        function(data) {
            // Data is object(parsed), you can see it's interface in source code
            console.log(data);
        }
    );
// Traceroute
dodig
    .traceroute('google.com')
    .then(
        function(data) {
            // Data is object(parsed), you can see it's interface in source code
            console.log(data);
        }
    );
// Scan
dodig
    // Host, port, request string, signature of data end
    .scan('google.com', 80, 'HEAD / HTTP/1.1', '\r\n\r\n')
    .then(
        function(data) {
            // Data here is a string, remote service response.
            console.log(data);
        }
    );