Using Nmap to display only the hosts with a specific port opened

This entry is recently updated at June 19, 2017

Goal

Using the grep function of Nmap we can filter out only the hosts that have a particular port opened while ignoring the others.

Commands

nmap 192.168.1.1-254 -p22 --open -oG - | awk '/22\/open.*/{print $2}'

Using the grep function of nmap we can filter out only the hosts that have a particular port opened, while ignoring the others.

Related Tools


What do you think, was this useful?

Yes!

Share with friends:
Share on Twitter