Giter Club home page Giter Club logo

node-portscanner's Introduction

The What

Fork of https://github.com/baalexander/node-portscanner with actual port scan (like very(!) simple nmap) and event emitter.

The portscanner module is an asynchronous JavaScript port scanner for Node.js.

You may consume events as they are emitted or just use the callbacks.

The How

To Use

A brief example:

// event emitting example
var Portscanner = require('./portscanner');
var ps = new Portscanner();

ps.on('scancomplete', function (ports) {
  console.log(ports);
});
ps.scan('192.168.2.35', 20, 100);

// callback example
var Portscanner = require('./portscanner');
var ps = new Portscanner();

ps.scan('192.168.2.35', 1, 1000, function (openPorts) {
  console.log(openPorts);
});

The example directory contains more detailed examples.

Events

method: checkPortStatus events:

  • error
  • open
  • closed
  • portChecked

method: scan events:

  • All events from checkPortStatus
  • scancomplete

method: findAPortWithStatus events:

  • All events from scan
  • firstopen
  • firstclosed

To Test

Bleh. I am a fan of testing, but currently looking into an easier way to test several HTTP connections. If any ideas, please message me.

The Future

Please create issues, or better yet, pull requests, for port scanning related features you'd like to see included.

The License (MIT)

Released under the MIT license. See the LICENSE file for the complete wording.

node-portscanner's People

Contributors

baalexander avatar denniskehrig avatar endangeredmassa avatar erikandreas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.