mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-10-30 13:25:25 +01:00
Saving everything before commit/push is supposed to be better ;-)
This commit is contained in:
13
testssl.sh
13
testssl.sh
@@ -123,6 +123,7 @@ trap "child_error" USR1
|
|||||||
########### Internal definitions
|
########### Internal definitions
|
||||||
#
|
#
|
||||||
declare -r VERSION="3.3dev"
|
declare -r VERSION="3.3dev"
|
||||||
|
# shellcheck disable=SC2034
|
||||||
declare -r SWCONTACT="dirk aet testssl dot sh"
|
declare -r SWCONTACT="dirk aet testssl dot sh"
|
||||||
[[ "$VERSION" =~ dev|rc|beta ]] && \
|
[[ "$VERSION" =~ dev|rc|beta ]] && \
|
||||||
SWURL="https://testssl.sh/dev/" ||
|
SWURL="https://testssl.sh/dev/" ||
|
||||||
@@ -2499,13 +2500,13 @@ service_detection() {
|
|||||||
send_app_data "$plaintext"
|
send_app_data "$plaintext"
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
receive_app_data true
|
receive_app_data true
|
||||||
[[ $? -eq 0 ]] || > "$TMPFILE"
|
[[ $? -eq 0 ]] || : > "$TMPFILE"
|
||||||
else
|
else
|
||||||
> "$TMPFILE"
|
: > "$TMPFILE"
|
||||||
fi
|
fi
|
||||||
send_close_notify "$DETECTED_TLS_VERSION"
|
send_close_notify "$DETECTED_TLS_VERSION"
|
||||||
else
|
else
|
||||||
> "$TMPFILE"
|
: > "$TMPFILE"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# SNI is not standardized for !HTTPS but fortunately for other protocols s_client doesn't seem to care
|
# SNI is not standardized for !HTTPS but fortunately for other protocols s_client doesn't seem to care
|
||||||
@@ -2920,7 +2921,7 @@ run_hsts() {
|
|||||||
fi
|
fi
|
||||||
debugme echo "hsts_age_sec: $hsts_age_sec"
|
debugme echo "hsts_age_sec: $hsts_age_sec"
|
||||||
if ! is_number "$hsts_age_sec"; then
|
if ! is_number "$hsts_age_sec"; then
|
||||||
pr_svrty_medium "misconfiguration: \'"$hsts_age_sec"\' is not a valid max-age specification"
|
pr_svrty_medium "misconfiguration: \'$hsts_age_sec\' is not a valid max-age specification"
|
||||||
fileout "${jsonID}_time" "MEDIUM" "misconfiguration, specified not a number for max-age"
|
fileout "${jsonID}_time" "MEDIUM" "misconfiguration, specified not a number for max-age"
|
||||||
set_grade_warning "HSTS max-age is misconfigured"
|
set_grade_warning "HSTS max-age is misconfigured"
|
||||||
else
|
else
|
||||||
@@ -18372,7 +18373,7 @@ run_breach() {
|
|||||||
fileout "$jsonID" "WARN" "Test failed as HTTP request stalled and was terminated" "$cve" "$cwe"
|
fileout "$jsonID" "WARN" "Test failed as HTTP request stalled and was terminated" "$cve" "$cwe"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
for c in ${has_compression[@]}; do
|
for c in "${has_compression[@]}"; do
|
||||||
if [[ $c =~ yes ]]; then
|
if [[ $c =~ yes ]]; then
|
||||||
detected_compression+="${c%:*} "
|
detected_compression+="${c%:*} "
|
||||||
fi
|
fi
|
||||||
@@ -24486,7 +24487,7 @@ debug_globals() {
|
|||||||
set_skip_tests() {
|
set_skip_tests() {
|
||||||
local t
|
local t
|
||||||
|
|
||||||
for t in ${SKIP_TESTS[@]} ; do
|
for t in "${SKIP_TESTS[@]}"; do
|
||||||
t="do_${t}"
|
t="do_${t}"
|
||||||
# declare won't do it here --> local scope
|
# declare won't do it here --> local scope
|
||||||
eval "$t"=false
|
eval "$t"=false
|
||||||
|
|||||||
Reference in New Issue
Block a user