#port-scan #scan #service-discovery #security #cross-platform #networking

app nscan

Cross-platform network scan tool for host and service discovery

19 releases (1 stable)

new 1.0.0 May 19, 2024
0.20.0 May 9, 2024
0.19.0 May 9, 2024
0.18.0 Dec 24, 2023
0.6.0 Jun 27, 2021

#316 in Network programming

Download history 85/week @ 2024-02-14 14/week @ 2024-02-21 17/week @ 2024-02-28 2/week @ 2024-03-06 33/week @ 2024-03-27 66/week @ 2024-04-03 210/week @ 2024-05-08 121/week @ 2024-05-15

331 downloads per month

MIT license

17K SLoC

nscan Crates.io License

Cross-platform network scan tool for host and service discovery.
Aims to be simple, fast, and efficient in performance.


  • Port scan
  • Host scan
  • Service detection
  • OS family detection


From Releases

You can download archives of precompiled binaries from the releases .

Using Cargo

cargo install nscan

Or you can use binstall for install nscan from github release.

cargo binstall nscan

Basic Usage

Default Port Scan

To scan the default ports on a target, simply specify the target:

nscan --target scanme.nmap.org

Sub-commands and Options

Usage: nscan [OPTIONS] [COMMAND]

  port        Scan port. nscan port --help for more information
  host        Scan host in specified network or host-list. nscan host --help for more information
  subdomain   Find subdomains. nscan subdomain --help for more information
  interfaces  Show network interfaces
  interface   Show default network interface
  check       Check dependencies (Windows only)
  help        Print this message or the help of the given subcommand(s)

  -t, --target <target>             Specify the target host. IP address or Hostname
  -i, --interface <interface_name>  Specify the network interface
      --noping                      Disable initial ping
  -F, --full                        Scan all ports (1-65535)
  -j, --json                        Displays results in JSON format.
  -o, --save <file_path>            Save scan result in JSON format - Example: -o result.json
  -h, --help                        Print help
  -V, --version                     Print version

Supported platforms

  • Linux
  • macOS
  • Windows


nscan uses raw sockets, which require elevated privileges. Execute with administrator rights.

Notes for Windows Users

When using nscan on Windows, please consider the following:

  • Npcap/WinPcap Installation:
    • Ensure that Npcap or WinPcap is installed on your system.
    • If using Npcap, install it with the "Install Npcap in WinPcap API-compatible Mode" option.
  • Build Dependencies:
    • Place the Packet.lib file from the Npcap SDK or WinPcap Developers pack in a directory named lib at the root of this repository.
    • The file can be found in the %LIB% or $Env:LIB environment variables.
    • Locate Packet.lib in /Lib/x64/Packet.lib for the 64-bit toolchain or /Lib/Packet.lib for the 32-bit toolchain.

This tool also serves as a test for my following projects.

  • netdev Cross-platform library for network interface and gateway
  • nex Cross-platform networking library


~1M SLoC