From faeb58e3d4fd40b04c035f389b04388c0c98bbb3 Mon Sep 17 00:00:00 2001 From: mollusk Date: Tue, 14 Apr 2020 09:40:17 -0700 Subject: [PATCH] nmip.sh: change logic --- nmip.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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