mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-10-30 23:30:59 +01:00 
			
		
		
		
	FIX #476
This commit is contained in:
		
							parent
							
								
									802a6da92c
								
							
						
					
					
						commit
						ddbf4caa46
					
				
							
								
								
									
										11
									
								
								testssl.sh
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								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,9 +7801,15 @@ 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 | ||||||
|  |                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')) |                     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 && \ | ||||||
|                ip4=$(filter_ip4_address $(host -t a "$1" 2>/dev/null | grep -v alias | sed 's/^.*address //')) |                ip4=$(filter_ip4_address $(host -t a "$1" 2>/dev/null | grep -v alias | sed 's/^.*address //')) | ||||||
| @ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user