mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-09-17 09:22:54 +02:00
handle UI output better when conn to port 80 failed
This commit is contained in:
18
testssl.sh
18
testssl.sh
@ -17707,16 +17707,22 @@ run_opossum() {
|
|||||||
uri=${URI/https:\/\//}
|
uri=${URI/https:\/\//}
|
||||||
response=$(http_head_printf http://${uri} 'Upgrade: TLS/1.0\r\n\r\nClose\r\n')
|
response=$(http_head_printf http://${uri} 'Upgrade: TLS/1.0\r\n\r\nClose\r\n')
|
||||||
# In any case we use $response but we handle the return codes
|
# In any case we use $response but we handle the return codes
|
||||||
case $? in
|
# 0: connection was fine, 1 or 3: no http connection
|
||||||
0) ret=0 ;;
|
ret=$?
|
||||||
1|3) ret=7 ;; # got stuck
|
|
||||||
esac
|
|
||||||
if [[ $response =~ Upgrade:\ TLS ]]; then
|
if [[ $response =~ Upgrade:\ TLS ]]; then
|
||||||
prln_svrty_high "VULNERABLE (NOT ok)"
|
prln_svrty_high "VULNERABLE (NOT ok)"
|
||||||
fileout "$jsonID" "CRITICAL" "VULNERABLE" "$cve" "$cwe" "$hint"
|
fileout "$jsonID" "CRITICAL" "VULNERABLE" "$cve" "$cwe" "$hint"
|
||||||
else
|
elif [[ $ret -eq 0 ]]; then
|
||||||
prln_svrty_good "not vulnerable (OK)"
|
prln_svrty_good "not vulnerable (OK)"
|
||||||
fileout "$jsonID" "OK" "not vulnerable $append" "$cve" "$cwe"
|
fileout "$jsonID" "OK" "not vulnerable" "$cve" "$cwe"
|
||||||
|
else
|
||||||
|
if [[ $ret -eq 3 ]]; then
|
||||||
|
prln_local_problem "direct connection to port 80 failed, better try without proxy"
|
||||||
|
fileout "$jsonID" "WARN" "direct connection to port 80 failed, try w/o no proxy" "$cve" "$cwe"
|
||||||
|
else
|
||||||
|
outln "connection to port 80 failed"
|
||||||
|
fileout "$jsonID" "INFO" "connection to port 80 failed" "$cve" "$cwe"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
IMAP|FTP|POP3|SMTP|LMTP|NNTP)
|
IMAP|FTP|POP3|SMTP|LMTP|NNTP)
|
||||||
|
Reference in New Issue
Block a user