roccomuso / nc-wrapper

Node.js wrapper to the netcat util with fallbacks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nc-wrapper NPM Version JavaScript Style Guide

Use netcat everywhere, with fallback support.

Cross-platform. Supports: macOS, Windows, Linux, OpenBSD, FreeBSD.

See also the full node.js implementation of netcat.

OS Supported
Linux
Mac OS
Windows

Install

$ npm i -g nc-wrapper

Usage ncw

Server side Client side
ncw -l -p 2389 ncw localhost 2389

By default on Linux and Windows will use the embedded binaries and the global installed ones only on exception raised.

On MacOS will try to use only the global nc if available.

Known issue. The process exit is handled as exception so it will enter into the catch block and spawn the fallback. I'm still looking for an elegant way to handle this.

Other example

Easily transfer a file:

Server side Client side
ncw -l 2389 > test cat testfile | ncw localhost 2389

Author

Rocco Musolino (@roccomuso)

About

Node.js wrapper to the netcat util with fallbacks.


Languages

Language:JavaScript 100.0%