Domanda

I wrote nmap command like:

nmap -oX test.xml -p 23 -il list.txt > out.txt

how can I tell nmap to print hosts from my list.txt which are open on port 23?

È stato utile?

Soluzione

You can't ask nmap to just print them, but you can grep nmap results:

nmap -p 23 -i list.txt | grep '^23.*open' -B3 | grep '^Nmap scan' | cut -d\( -f2 | cut -d\) -f1
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top