Fixed help
This commit is contained in:
parent
079723e951
commit
0ddb049772
1 changed files with 7 additions and 6 deletions
|
@ -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
|
||||
;;
|
||||
*)
|
||||
|
|
Loading…
Reference in a new issue