mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-06 00:39:44 +01:00
FIX #476
This commit is contained in:
parent
802a6da92c
commit
ddbf4caa46
13
testssl.sh
13
testssl.sh
@ -7787,6 +7787,7 @@ check_resolver_bins() {
|
|||||||
# arg1: a host name. Returned will be 0-n IPv4 addresses
|
# arg1: a host name. Returned will be 0-n IPv4 addresses
|
||||||
get_a_record() {
|
get_a_record() {
|
||||||
local ip4=""
|
local ip4=""
|
||||||
|
local cname_temp=""
|
||||||
local saved_openssl_conf="$OPENSSL_CONF"
|
local saved_openssl_conf="$OPENSSL_CONF"
|
||||||
|
|
||||||
OPENSSL_CONF="" # see https://github.com/drwetter/testssl.sh/issues/134
|
OPENSSL_CONF="" # see https://github.com/drwetter/testssl.sh/issues/134
|
||||||
@ -7800,8 +7801,14 @@ get_a_record() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -z "$ip4" ]]; then
|
if [[ -z "$ip4" ]]; then
|
||||||
which dig &> /dev/null && \
|
if which dig &> /dev/null ; then
|
||||||
ip4=$(filter_ip4_address $(dig +short -t a "$1" 2>/dev/null | sed '/^;;/d'))
|
cname_temp=$(dig +short -t CNAME "$1" 2>/dev/null)
|
||||||
|
if [[ -n "$cname_temp" ]]; then
|
||||||
|
ip4=$(filter_ip4_address $(dig +short -t a "$cname_temp" 2>/dev/null | sed '/^;;/d'))
|
||||||
|
else
|
||||||
|
ip4=$(filter_ip4_address $(dig +short -t a "$1" 2>/dev/null | sed '/^;;/d'))
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -z "$ip4" ]]; then
|
if [[ -z "$ip4" ]]; then
|
||||||
which host &> /dev/null && \
|
which host &> /dev/null && \
|
||||||
@ -8845,4 +8852,4 @@ fi
|
|||||||
exit $?
|
exit $?
|
||||||
|
|
||||||
|
|
||||||
# $Id: testssl.sh,v 1.545 2016/09/21 19:42:44 dirkw Exp $
|
# $Id: testssl.sh,v 1.546 2016/09/21 19:59:48 dirkw Exp $
|
||||||
|
Loading…
Reference in New Issue
Block a user