nmap 找不到 nse_main.lua

nmap could not locate nse_main.lua

当我尝试使用以下内容时 nmap -p 443 -Pn --script=ssl-cert ip_address 我收到以下错误:

Starting Nmap 7.70 ( https://nmap.org ) at 2019-06-04 15:20 UTC
NSE: failed to initialize the script engine:
could not locate nse_main.lua
stack traceback:
    [C]: in ?

QUITTING!

nmap --version的回应 是

Nmap version 7.70 ( https://nmap.org )
Platform: x86_64-alpine-linux-musl
Compiled with: liblua-5.3.5 openssl-1.1.1a libssh2-1.8.0 libz-1.2.11 libpcre-8.42 libpcap-1.9.0-PRE-GIT nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select

您还需要安装软件包 nmap-scripts,因为它不会自动安装在 Alpine 上(参见 here)。

所以只需 运行 apk add nmap-scripts 或将其添加到您的 dockerfile。