mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-07 17:20:57 +01:00
use per default a lf before the first fatal message
This commit is contained in:
parent
c75a2cd838
commit
55713e4929
@ -10438,7 +10438,7 @@ find_openssl_binary() {
|
|||||||
# no ERRFILE initialized yet, thus we use /dev/null for stderr directly
|
# no ERRFILE initialized yet, thus we use /dev/null for stderr directly
|
||||||
$OPENSSL version -a 2>/dev/null >/dev/null
|
$OPENSSL version -a 2>/dev/null >/dev/null
|
||||||
if [[ $? -ne 0 ]] || [[ ! -x "$OPENSSL" ]]; then
|
if [[ $? -ne 0 ]] || [[ ! -x "$OPENSSL" ]]; then
|
||||||
fatal "\ncannot exec or find any openssl binary" -5
|
fatal "cannot exec or find any openssl binary" -5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# http://www.openssl.org/news/openssl-notes.html
|
# http://www.openssl.org/news/openssl-notes.html
|
||||||
@ -10886,6 +10886,7 @@ cleanup () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fatal() {
|
fatal() {
|
||||||
|
outln
|
||||||
prln_magenta "Fatal error: $1" >&2
|
prln_magenta "Fatal error: $1" >&2
|
||||||
exit $2
|
exit $2
|
||||||
# 1: cmd line error
|
# 1: cmd line error
|
||||||
@ -11026,7 +11027,7 @@ prepare_logging() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if ! "$APPEND"; then
|
if ! "$APPEND"; then
|
||||||
[[ -e "$LOGFILE" ]] && outln && fatal "\"$LOGFILE\" exists. Either use \"--append\" or (re)move it" 1
|
[[ -e "$LOGFILE" ]] && fatal "\"$LOGFILE\" exists. Either use \"--append\" or (re)move it" 1
|
||||||
fi
|
fi
|
||||||
tmln_out "## Scan started as: \"$PROG_NAME $CMDLINE\"" >>"$LOGFILE"
|
tmln_out "## Scan started as: \"$PROG_NAME $CMDLINE\"" >>"$LOGFILE"
|
||||||
tmln_out "## at $HNAME:$OPENSSL_LOCATION" >>"$LOGFILE"
|
tmln_out "## at $HNAME:$OPENSSL_LOCATION" >>"$LOGFILE"
|
||||||
@ -12279,12 +12280,12 @@ parse_cmd_line() {
|
|||||||
|
|
||||||
# Show usage if no further options were specified
|
# Show usage if no further options were specified
|
||||||
if [[ -z "$1" ]] && [[ -z "$FNAME" ]] && ! $do_display_only; then
|
if [[ -z "$1" ]] && [[ -z "$FNAME" ]] && ! $do_display_only; then
|
||||||
echo && fatal "URI missing" "1"
|
fatal "URI missing" "1"
|
||||||
else
|
else
|
||||||
# left off here is the URI
|
# left off here is the URI
|
||||||
URI="$1"
|
URI="$1"
|
||||||
# parameter after URI supplied:
|
# parameter after URI supplied:
|
||||||
[[ -n "$2" ]] && echo && fatal "URI comes last" "1"
|
[[ -n "$2" ]] && fatal "URI comes last" "1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ "$DEBUG" -ge 5 ]] && debug_globals
|
[[ "$DEBUG" -ge 5 ]] && debug_globals
|
||||||
|
Loading…
Reference in New Issue
Block a user