我使用 NMAP,在大型网络上运行扫描以查看开放端口。输出文件是 2MB,但我想过滤掉所有关闭端口的 IP 地址。
Nmap scan report for 10.x.x.x
Host is up (0.048s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
23/tcp open telnet
Nmap scan report for 10.x.x.x
Host is up (0.046s latency).
All 1000 scanned ports on 10.x.x.x are closed
Nmap scan report for 10.x.x.x
Host is up (0.045s latency).
All 1000 scanned ports on 10.x.x.x are closed
Run Code Online (Sandbox Code Playgroud)
应该输出到只输出到:
Nmap scan report for 10.x.x.x
Host is up (0.048s latency).
Not shown: 998 closed …Run Code Online (Sandbox Code Playgroud)