From 0ddb04977269e46e6a77925de63ffe20413ee882 Mon Sep 17 00:00:00 2001 From: Jonny007-MKD Date: Fri, 28 Feb 2020 21:01:33 +0100 Subject: [PATCH] Fixed help --- check_nmap.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/check_nmap.sh b/check_nmap.sh index 8276962..cc9df12 100755 --- a/check_nmap.sh +++ b/check_nmap.sh @@ -11,6 +11,10 @@ NMAP_ARGS="" KNOWN_PORTS=() while [[ $# -gt 0 ]]; do case $1 in + -h|--host) HOST="$2"; shift;; + -p|--portrange) PORT_RANGE="$2"; shift;; + -k|--known) KNOWN_PORTS+=($2); shift;; + -d|--debug) DEBUG=true;; -i|--input) INPUT="$2" if [ ! -f "$INPUT" ]; then @@ -18,15 +22,12 @@ while [[ $# -gt 0 ]]; do exit 3 fi shift;; - -h|--host) HOST="$2"; shift;; - -d|--debug) DEBUG=true;; - -p|--portrange) PORT_RANGE="$2"; shift;; - -k|--known) KNOWN_PORTS+=($2); shift;; --) shift; NMAP_ARGS="$@"; shift $#;; -?|--help) echo "Check nmap portscan. Arguments:" - echo "--raid NAME: Raid name, e.g. md0" - echo "--input FILE: Read from this file. Default: /proc/mdstat" + echo "--host HOSTNAME/IP: Host that shall be scanned by nmap" + echo "--portrange RANGE: Ports that shall be scanned (nmap format)" + echo "--known PORTNUMBER: Port number that is expected to be open" exit 0 ;; *)