Pregunta

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?

¿Fue útil?

Solución

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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top