如何编辑nmap输出

如何编辑nmap输出,nmap,Nmap,我需要计算有多少设备使用nmap打开了端口80。我试过使用“nmap-p80——打开192.168.153.*”,但这并不打印我想要的内容 我想要以下输出: “端口80打开的设备数:2” 有人知道怎么做吗?您可以尝试使用shell脚本 nmap 192.168.1.* -p80 --open | grep report > output;printf "Number of devices with port 80 open: "; cat output| wc -l 输出: Numb

我需要计算有多少设备使用nmap打开了端口80。我试过使用“nmap-p80——打开192.168.153.*”,但这并不打印我想要的内容

我想要以下输出: “端口80打开的设备数:2”


有人知道怎么做吗?

您可以尝试使用shell脚本

nmap 192.168.1.* -p80 --open  | grep report > output;printf "Number of devices with port 80 open: ";  cat output| wc -l
输出:

Number of devices with port 80 open: 3

您是否愿意创建一个shell脚本,以您想要的样式运行并获取nmap命令和
echo
输出的输出?