如何编辑nmap输出

时间:2017-03-12 13:20:08

标签: nmap

我需要计算有多少设备使用nmap打开端口80。我尝试使用“nmap -p80 --open 192.168.153。*”,但这不能打印出我想要的内容。

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

有谁知道怎么做?

1 个答案:

答案 0 :(得分:1)

您可以尝试使用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