nmip.sh: change logic
This commit is contained in:
parent
562ad079ea
commit
faeb58e3d4
4
nmip.sh
4
nmip.sh
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user