diff --git a/nmip.sh b/nmip.sh index 40b3f15..82195ba 100755 --- a/nmip.sh +++ b/nmip.sh @@ -19,8 +19,10 @@ NC='\033[0m' # No Color if [ ! -f /usr/bin/nmap ];then printf "${LRED} Nmap is not installed...${NC}\n" -else +elif [ ! -z "${1}" ];then + nmap -sP "${1}/24" +else printf "${LGREEN}Looking up ${lanip}...${NC}\n" nmap -sP ${lanip}/24 # Use sudo to get names of devies fi