https://github.com/justintaddei/tcp-scanner
A simple promise-based TCP scanner, written in Typescript.
https://github.com/justintaddei/tcp-scanner
Last synced: 3 months ago
JSON representation
A simple promise-based TCP scanner, written in Typescript.
- Host: GitHub
- URL: https://github.com/justintaddei/tcp-scanner
- Owner: justintaddei
- License: mit
- Created: 2019-10-13T05:30:52.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-27T19:02:12.000Z (11 months ago)
- Last Synced: 2024-12-29T13:05:41.680Z (5 months ago)
- Language: TypeScript
- Size: 150 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TCP-Scanner





[](https://github.com/prettier/prettier)

A dead simple promise-based TCP scanner, written in Typescript.
## Installation
```bash
$ npm install @network-utils/tcp-scanner --save
```## Usage
### `scan(port: number, range?: string, timeout?: number): Promise`
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 table
`timeout` 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