#端口扫描 #服务发现 #扫描 #安全 #跨平台 #网络 #命令行界面

应用程序 nscan

跨平台主机和服务发现网络扫描工具

21个版本 (3个稳定版)

1.2.0 2024年7月21日
1.0.0 2024年5月19日
0.20.0 2024年5月9日
0.18.0 2023年12月24日
0.6.0 2021年6月27日

#509网络编程

Download history 197/week @ 2024-05-05 15/week @ 2024-05-12 175/week @ 2024-05-19 4/week @ 2024-05-26 162/week @ 2024-06-09 18/week @ 2024-06-16 1/week @ 2024-06-23 2/week @ 2024-06-30 120/week @ 2024-07-21 5/week @ 2024-07-28

每月125 次下载

MIT 许可证

1MB
14K SLoC

nscan Crates.io License

跨平台主机和服务发现网络扫描工具。
旨在简单、快速且高效。

注意

nscan 将由我们的网络映射工具 nrev 取代。对 nscan 的更新将有限,因为我们希望将 nscan 专注于扫描特定任务。我们鼓励所有用户迁移到 nrev 以获取最新功能和改进。

功能

  • 端口扫描
  • 主机扫描
  • 服务检测
  • 操作系统家族检测
  • 子域扫描

安装

通过shell脚本安装预构建的二进制文件

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/shellrow/nscan/releases/latest/download/nscan-installer.sh | sh

通过powershell脚本安装预构建的二进制文件

irm https://github.com/shellrow/nscan/releases/latest/download/nscan-installer.ps1 | iex

通过Homebrew安装预构建的二进制文件

brew install shellrow/tap-nscan/nscan

从发布版

您可以从 发布版 下载预编译二进制文件的存档。

使用Cargo

cargo install nscan

或者您可以使用 binstall 从GitHub发布版安装nscan。

cargo binstall nscan

基本用法

默认端口扫描

要扫描目标上的默认端口,只需指定目标

nscan --target scanme.nmap.org

子命令和选项

Usage: nscan [OPTIONS] [COMMAND]

Commands:
  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)

Options:
  -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
  -q, --quiet                       Quiet mode. Suppress output. Only show final results.
  -h, --help                        Print help
  -V, --version                     Print version

支持的平台

  • Linux
  • macOS
  • Windows

权限

nscan 使用原始套接字,需要提升权限。以管理员权限执行。

Windows用户注意事项

在使用nscan在Windows上时,请考虑以下事项

  • Npcap/WinPcap安装
    • 请确保您的系统已安装 Npcap 或 WinPcap。
    • 如果使用Npcap,请使用“以WinPcap API兼容模式安装Npcap”选项安装它。
  • 构建依赖项
    • 将来自 Npcap SDK 或 WinPcap 开发者包的 Packet.lib 文件放置在此仓库根目录下名为 lib 的目录中。
    • 该文件可以在 %LIB% 或 $Env:LIB 环境变量中找到。
    • 对于 64 位工具链,在 /Lib/x64/Packet.lib 中找到 Packet.lib;对于 32 位工具链,在 /Lib/Packet.lib 中找到。

依赖项

~26–41MB
~755K SLoC