Open Services

$ nmap -T4 -p- <IP> #Lists all open services on the target
$ nmap -T4 -p- -Pn <IP> #-Pn option treats the target as active
$ sudo nmap -T4 -p- -A -Pn <IP> #Enable OS detection, version detection, script scanning, and traceroute
$ PORTS = nmap -T4 -p- <IP> | grep -e '^[1-9]' | cut -d '/' -f1 | paste -d, -s #Store only open ports detail as comma-separated 
$ nmap -T4 -p$PORTS -A <IP> 

Last updated