Skip to content

Instantly share code, notes, and snippets.

Last active Sep 1, 2016
What would you like to do?
Discover hosts on a network
# This bash script will output the IP addresses of all the live hosts on a network. Note: Hosts that filter ICMP
# are not included in this list.
# Usage: ./mapnet IP_RANGE Example: ./mapnet
if [ -z "$1" ]; then
exit "Input IP range to scan. Example:"
nmap $1 -n -sP | grep report | awk '{print $5}'
echo "Mapnet return code: $?"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment