From e293b7d839e4a4e69a73b51270fd1b7142fa7764 Mon Sep 17 00:00:00 2001 From: Dirk Date: Sat, 31 Jul 2021 18:27:03 +0200 Subject: [PATCH] Look-ahead trick for -U --ids-friendly If the order of the cmdline is '-U --ids-friendly' then we need to make sure we catch --ids-friendly. Normally we do not, see #1717. The following statement makes sure. In the do-while + case-esac loop the check for --ids-friendly will be executed again, but it does not hurt --- testssl.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/testssl.sh b/testssl.sh index 13fe49d..e496a39 100755 --- a/testssl.sh +++ b/testssl.sh @@ -19531,6 +19531,13 @@ parse_cmd_line() { do_client_simulation=true ;; -U|--vulnerable|--vulnerabilities) + # Lookahead function: If the order of the cmdline is '-U --ids-friendly' + # then we need to make sure we catch --ids-friendly. Normally we do not, + # see #1717. The following statement makes sure. In the do-while + case-esac + # loop it will be execute again, but it does not hurt + if [[ "${CMDLINE_ARRAY[@]}" =~ --ids-friendly ]]; then + OFFENSIVE=false + fi do_vulnerabilities=true do_heartbleed="$OFFENSIVE" do_ccs_injection="$OFFENSIVE"