1.0.1 • Published 7 years ago

nc-wrapper v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

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.

Install

$ npm i -g nc-wrapper

Usage ncw

Server sideClient side
ncw -l -p 2389ncw 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 sideClient side
ncw -l 2389 > testcat testfile | ncw localhost 2389

Author

Rocco Musolino (@roccomuso)