Socket
Socket
Sign inDemoInstall

portscanner

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

portscanner - npm Package Compare versions

Comparing version 0.2.3 to 1.0.0

13

lib/portscanner.js

@@ -67,2 +67,3 @@ var net = require('net')

var timeout = options.timeout || 400
var connectionRefused = false;

@@ -90,3 +91,7 @@ var socket = new Socket()

socket.on('error', function(exception) {
error = exception
if(exception.code !== "ECONNREFUSED") {
error = exception
}
else
connectionRefused = true;
status = 'closed'

@@ -96,3 +101,7 @@ })

// Return after the socket has closed
socket.on('close', function() {
socket.on('close', function(exception) {
if(exception && !connectionRefused)
error = exception;
else
error = null;
callback(error, status)

@@ -99,0 +108,0 @@ })

2

package.json

@@ -11,3 +11,3 @@ {

],
"version": "0.2.3",
"version": "1.0.0",
"preferGlobal": false,

@@ -14,0 +14,0 @@ "homepage": "https://github.com/baalexander/node-portscanner",

@@ -0,13 +1,12 @@

# node-portscanner
## The What
The portscanner module is
an asynchronous JavaScript port scanner for Node.js.
The portscanner module is an asynchronous JavaScript port scanner for Node.js.
Portscanner can check a port,
or range of ports,
for 'open' or 'closed' statuses.
Portscanner can check a port, or range of ports, for 'open' or 'closed'
statuses.
## Install
## The How
### To Install
```bash

@@ -17,3 +16,3 @@ npm install portscanner

### To Use
## Usage

@@ -46,15 +45,17 @@ A brief example:

### To Test
## 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.
There are currently no tests.
If you have ideas,
please open an issue.
## The Future
## Future
Please create issues, or better yet, pull requests, for port scanning related
features you'd like to see included.
Please create issues or pull requests
for port scanning related features
you'd like to see included.
## The License (MIT)
## License (MIT)
Released under the MIT license. See the LICENSE file for the complete wording.
[MIT](LICENSE)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc