@network-utils/tcp-scanner
v1.0.2
Published
A dead simple promise-based TCP scanner, written in Typescript.
Downloads
5
Readme
TCP-Scanner
A dead simple promise-based TCP scanner, written in Typescript.
Installation
$ npm install @network-utils/tcp-scanner --save
Usage
scan(port: number, range?: string, timeout?: number): Promise<string[]>
Scans the network for hosts with port
open.
port
The port to connect to.range
A CIDR range or "arp"
to limit the scan to the system's arp tabletimeout
The timeout for each TCP connection. Defaults to 200ms
Throws an invalid CIDR subnet
error if range
is not a CIDR range or the string "arp"
Throws a "Negative port"
error if port < 1
.
To-Do
- Add tests
License
MIT