nc-wrapper
v1.0.1
Published
Node.js wrapper to the netcat util with fallbacks.
Downloads
3
Maintainers
Readme
nc-wrapper
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 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)