Have ideas to improve npm?Join in the discussion! »

    @network-utils/tcp-scanner
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.2 • Public • Published

    TCP-Scanner

    code style: prettier

    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 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

    Install

    npm i @network-utils/tcp-scanner

    DownloadsWeekly Downloads

    13

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    7.08 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar