netty

net tools for node.js

npm install netty
9 downloads in the last week
11 downloads in the last month

NPM version Build Status Dependency Status Coverage Status

netty

net tools for node.js

List of included tools

  • Scan
  • Ping
  • Whois
  • Core

Usage

Core

the core module is a connection bridge to your internal server (Currently not being used but will be implemented in the future)

var Core = require('netty').Core;

var auth = {
    'host': "internal.server.ip.com",
    'username': "AdminAsRoot",
    'password': "ThisIsASecret"
};

Core('127.0.0.1', auth);

Ping

a simple ping utility in node

var Ping = require('netty').Ping;
Ping('www.github.com'); // this will automatically log out the info to the console but feel free to add a callback to do something else :)

Whois

a Whois util

var Whois = require('netty').Whois;
Whois('github.com') //again auto logging, but callbacks are welcomed

Scan

the scan module is a web scraper broken up into 2 parts Simple and Advanced

Simple

the simple mode is just a basic one liner to run

var Scan = require('netty').Scan;
Scan.simple('http://example.com');

Advanced

the advanced mode is a little more complex, it proviceds more customisation/overrides to the scan the api being the following

var Scan = require('netty').Scan;
Scan.advanced(target, path, port, proto, interval, concun, cb);
  • target - the url you wish to crawl
  • path - path to start the crawl from
  • port - the port to connect
  • proto - the protocol being used by the server (http/https)
  • interval - scan interval (defaults to 10000[10 seconds])
  • concun - max concunrency (defaults to 1)[1 process limit]
  • cb - callback
Example
var Scan = require('netty').Scan;
Scan.advanced('http://example.com', '/', 3000, 'https', 2, 1, function(){
    console.log('Scan Complete'); //the function will output the data to the console automatically.
});
npm loves you