Nmap: Difference between revisions
From Cramsession
Jump to navigationJump to search
✍️ Verified Author: Mflavell • Click to view professional profile & credentials
No edit summary |
No edit summary |
||
| Line 12: | Line 12: | ||
nmap -n -sn ''network''/''mask'' -oG | awk '/Up$/{print $2}' | sort -V > hosts.txt | nmap -n -sn ''network''/''mask'' -oG | awk '/Up$/{print $2}' | sort -V > hosts.txt | ||
=Find the open ports= | |||
nmap ''ip'' | |||
Revision as of 01:19, 10 December 2024
Simple NMAP scan of the network
sudo su nmap -sn network/mask -oN hosts.txt
- sn prevents a port scan of hosts
Just return the IP addresses
nmap -n -sn network/mask -oG | awk '/Up$/{print $2}' | sort -V > hosts.txt
Find the open ports
nmap ip