nmap:nping回声到stderr

时间:2018-04-05 01:52:26

标签: node.js macos nmap

在macOS High Sierra上, nping 可以通过 brew install nmap 获得,它可以正常运行:

  

nping --tcp-connect --count = 1 --dest-port = 443 8.8.8.8

Starting Nping 0.7.70 ( https://nmap.org/nping ) at 2018-04-04 18:46 PDT
libnsock mksock_bind_addr(): Bind to 0.0.0.0:0 failed (IOD #1): Invalid argument (22)
SENT (0.0030s) Starting TCP Handshake > 8.8.8.8:443
RCVD (0.0166s) Handshake with 8.8.8.8:443 completed

Max rtt: 13.790ms | Min rtt: 13.790ms | Avg rtt: 13.790ms
TCP connection attempts: 1 | Successful connections: 1 | Failed: 0 (0.00%)
Nping done: 1 IP address pinged in 0.02 seconds

nping --version
Nping version 0.7.70

注意由macOS回显到stderr的行:

  

libnsock mksock_bind_addr():绑定到0.0.0.0:0失败(IOD#1):无效   论证(22)

任何聪明的npingers都能解释如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

您需要以root特权运行命令。试试这个:

sudo nping --tcp-connect --count = 1 --dest-port = 443 8.8.8.8