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=()
|
KNOWN_PORTS=()
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
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)
|
-i|--input)
|
||||||
INPUT="$2"
|
INPUT="$2"
|
||||||
if [ ! -f "$INPUT" ]; then
|
if [ ! -f "$INPUT" ]; then
|
||||||
|
@ -18,15 +22,12 @@ while [[ $# -gt 0 ]]; do
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
shift;;
|
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 $#;;
|
--) shift; NMAP_ARGS="$@"; shift $#;;
|
||||||
-?|--help)
|
-?|--help)
|
||||||
echo "Check nmap portscan. Arguments:"
|
echo "Check nmap portscan. Arguments:"
|
||||||
echo "--raid NAME: Raid name, e.g. md0"
|
echo "--host HOSTNAME/IP: Host that shall be scanned by nmap"
|
||||||
echo "--input FILE: Read from this file. Default: /proc/mdstat"
|
echo "--portrange RANGE: Ports that shall be scanned (nmap format)"
|
||||||
|
echo "--known PORTNUMBER: Port number that is expected to be open"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in a new issue