debug scan result

This commit is contained in:
olli 2024-01-30 10:25:57 +01:00
parent c5a78ab5c6
commit 3ec53df0ab

View File

@ -201,19 +201,20 @@
do do
host ${host} >/dev/null 2>&1 || continue host ${host} >/dev/null 2>&1 || continue
curl -s https://${host} >/dev/null 2>&1 || continue curl -s https://${host} >/dev/null 2>&1 || continue
until ssllabs-scan --quiet ${host} | jq '.[] | .endpoints | .[] | .grade' >${g_tmp}/ssllabs-scan-result 2>&1 until ssllabs-scan --quiet ${host} >/tmp/ssllabs-scan-result-$host
do do
sleep 60 sleep 60
done done
cat /tmp/ssllabs-scan-result-$host | jq '.[] | .endpoints | .[] | .grade' >${g_tmp}/ssllabs-scan-result 2>&1 >${g_tmp}/ssllabs-scan-result
if ! egrep -q 'A+|null' ${g_tmp}/ssllabs-scan-result if ! egrep -q 'A+|null' ${g_tmp}/ssllabs-scan-result
then then
#if ! grep -q T ${g_tmp}/ssllabs-scan-result #if ! grep -q T ${g_tmp}/ssllabs-scan-result
#then #then
g_echo_error "Qualys SSL Labs scan-result for ${host} not A+: $(cat ${g_tmp}/ssllabs-scan-result) g_echo_error "Qualys SSL Labs scan-result for ${host} not A+: $(cat ${g_tmp}/ssllabs-scan-result)
https://www.ssllabs.com/ssltest/analyze.html?d=${host}&hideResults=on" https://www.ssllabs.com/ssltest/analyze.html?d=${host}&hideResults=on
$(cat ${g_tmp}/ssllabs-scan-result) Result: $(cat ${g_tmp}/ssllabs-scan-result)"
#fi #fi
else else
g_echo_ok "Qualys SSL Labs scan-result for ${host}: $(cat ${g_tmp}/ssllabs-scan-result)" g_echo_ok "Qualys SSL Labs scan-result for ${host}: $(cat ${g_tmp}/ssllabs-scan-result)"