mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
Fix switch --ids-friendly
This switch had no effect. There was probably a regression problem as it worked before. Besides fixing that the large case statement in parse_cmd_line() was simplified, in a sense that banner and help functions were moved to a separate case statement.
This commit is contained in:
parent
b0b084dcda
commit
073d383f76
35
testssl.sh
35
testssl.sh
@ -19364,24 +19364,25 @@ parse_cmd_line() {
|
|||||||
CMDLINE="$(create_cmd_line_string "${CMDLINE_ARRAY[@]}")"
|
CMDLINE="$(create_cmd_line_string "${CMDLINE_ARRAY[@]}")"
|
||||||
CMDLINE_PARSED=false
|
CMDLINE_PARSED=false
|
||||||
|
|
||||||
# Show usage if no options were specified
|
case $1 in
|
||||||
[[ -z "$1" ]] && help 0
|
--help|"")
|
||||||
# Set defaults if only an URI was specified, maybe ToDo: use "="-option, then: ${i#*=} i.e. substring removal
|
help 0
|
||||||
[[ "$#" -eq 1 ]] && set_scanning_defaults
|
;;
|
||||||
|
-b|--banner|-v|--version)
|
||||||
|
maketempf
|
||||||
|
get_install_dir
|
||||||
|
find_openssl_binary
|
||||||
|
prepare_debug
|
||||||
|
mybanner
|
||||||
|
exit $ALLOK
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# initializing
|
||||||
|
set_scanning_defaults
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--help)
|
|
||||||
help 0
|
|
||||||
;;
|
|
||||||
-b|--banner|-v|--version)
|
|
||||||
maketempf
|
|
||||||
get_install_dir
|
|
||||||
find_openssl_binary
|
|
||||||
prepare_debug
|
|
||||||
mybanner
|
|
||||||
exit $ALLOK
|
|
||||||
;;
|
|
||||||
--mx)
|
--mx)
|
||||||
do_mx_all_ips=true
|
do_mx_all_ips=true
|
||||||
PORT=25
|
PORT=25
|
||||||
@ -19883,8 +19884,8 @@ parse_cmd_line() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
[[ "$DEBUG" -ge 5 ]] && debug_globals
|
[[ "$DEBUG" -ge 5 ]] && debug_globals
|
||||||
# if we have no "do_*" set here --> query_globals: we do a standard run -- otherwise just the one specified
|
set_scanning_defaults
|
||||||
query_globals && set_scanning_defaults
|
query_globals
|
||||||
CMDLINE_PARSED=true
|
CMDLINE_PARSED=true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user