From eafeb904f466d684388f5e47fae813ecf6075a39 Mon Sep 17 00:00:00 2001 From: Dirk Wetter Date: Thu, 3 Sep 2020 14:22:53 +0200 Subject: [PATCH] Fix emptying of SERVICE variable in determine_service() SERVICE global was previously set to $protocol which was meant to set this for STARTTLS services. However it was executes outside the corresponding if-statement. This commit moves the statement where it belongs. --- testssl.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testssl.sh b/testssl.sh index 72f7ecc..e3b9c13 100755 --- a/testssl.sh +++ b/testssl.sh @@ -20370,11 +20370,11 @@ determine_service() { fatal "momentarily only ftp, smtp, lmtp, pop3, imap, xmpp, xmpp-server, telnet, ldap, nntp, postgres and mysql allowed" $ERR_CMDLINE ;; esac - fi + # It comes handy later also for STARTTLS injection to define this global. When we do banner grabbing + # or replace service_detection() we might not need that anymore + SERVICE=$protocol - # It comes handy later also for STARTTLS injection to define this global. When we do banner grabbing - # or replace service_detection() we might not need that anymore - SERVICE=$protocol + fi tmpfile_handle ${FUNCNAME[0]}.txt return 0 # OPTIMAL_PROTO, GET_REQ*/HEAD_REQ* is set now