mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
better matching of empty server banners
.. which could have led to borken JSON too
This commit is contained in:
parent
8c9fdc6cc9
commit
b1b30b3fb8
@ -2161,7 +2161,7 @@ run_server_banner() {
|
||||
grep -ai '^Server' $HEADERFILE >$TMPFILE
|
||||
if [[ $? -eq 0 ]]; then
|
||||
serverbanner=$(sed -e 's/^Server: //' -e 's/^server: //' $TMPFILE)
|
||||
if [[ x"$serverbanner" == "x\n" ]] || [[ x"$serverbanner" == "x\n\r" ]] || [[ -z "$serverbanner" ]]; then
|
||||
if [[ "$serverbanner" == $'\n' ]] || [[ "$serverbanner" == $'\r' ]] || [[ "$serverbanner" == $'\n\r' ]] || [[ -z "$serverbanner" ]]; then
|
||||
outln "banner exists but empty string"
|
||||
fileout "$jsonID" "INFO" "Server banner is empty"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user