diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2019-07-14 09:43:06 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2019-07-14 09:43:06 +0300 |
commit | 1a512984c152f0ff0a45fe1f40884fd91c865293 (patch) | |
tree | 28cdbe231e64585254af91eca4bf41dcb1f24a01 /include/tests_ssh | |
parent | 94c089e175e5134d6fb6b5a79006945f80b2c8b8 (diff) |
[SSH-7406] instead of just carriage return, strip all control characters
Diffstat (limited to 'include/tests_ssh')
-rw-r--r-- | include/tests_ssh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/tests_ssh b/include/tests_ssh index 852e2db5..dde395e3 100644 --- a/include/tests_ssh +++ b/include/tests_ssh @@ -102,7 +102,7 @@ if [ ${OPENSSHD_RUNNING} -eq 1 ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi Register --test-no SSH-7406 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Determine OpenSSH version" if [ ${SKIPTEST} -eq 0 ]; then - OPENSSHD_VERSION=$(${SSHDBINARY} -t -d 2>&1 | ${GREPBINARY} 'sshd version' | ${AWKBINARY} '{if($4~OpenSSH_){print $4}}' | ${AWKBINARY} -F_ '{print $2}' | ${TRBINARY} -d ',' | ${TRBINARY} -d '\r') + OPENSSHD_VERSION=$(${SSHDBINARY} -t -d 2>&1 | ${GREPBINARY} 'sshd version' | ${AWKBINARY} '{if($4~OpenSSH_){print $4}}' | ${AWKBINARY} -F_ '{print $2}' | ${TRBINARY} -d '[:cntrl:],') LogText "Result: discovered OpenSSH version is ${OPENSSHD_VERSION}" if [ ! -z ${OPENSSHD_VERSION} ]; then OPENSSHD_VERSION_MAJOR=$(echo ${OPENSSHD_VERSION%%p*} | ${AWKBINARY} -F. '{print $1}') |