nmip.sh: change logic

This commit is contained in:
mollusk 2020-04-14 09:40:17 -07:00
parent 562ad079ea
commit faeb58e3d4

View File

@ -19,8 +19,10 @@ NC='\033[0m' # No Color
if [ ! -f /usr/bin/nmap ];then if [ ! -f /usr/bin/nmap ];then
printf "${LRED} Nmap is not installed...${NC}\n" 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" printf "${LGREEN}Looking up ${lanip}...${NC}\n"
nmap -sP ${lanip}/24 # Use sudo to get names of devies nmap -sP ${lanip}/24 # Use sudo to get names of devies
fi fi