我编写了 nmap 命令
,如下所示:
nmap -oX test.xml -p 23 -il list.txt > out.txt
我如何告诉 nmap 从我的 list.txt 打印在端口 23 上打开的主机?
最佳答案
你不能要求 nmap 只打印它们,但你可以 grep nmap 结果:
nmap -p 23 -i list.txt | grep '^23.*open' -B3 | grep '^Nmap scan' | cut -d\( -f2 | cut -d\) -f1
关于linux - 从列表中读取并打印主机名在特定端口上打开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21338338/