mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-10-30 21:35:26 +01:00 
			
		
		
		
	Wrap long lines in display_rdns_etc()
Some sites have a long list of IP addresses and some IP addresses have a long list of DNS names that map to them. This PR changes `display_rdns_etc()` to use `out_row_aligned_max_width()` to print the other IP addresses in `$IP46ADDRs` and to print `$rDNS`.
This commit is contained in:
		| @@ -12176,7 +12176,7 @@ determine_service() { | ||||
|  | ||||
|  | ||||
| display_rdns_etc() { | ||||
|      local ip | ||||
|      local ip further_ip_addrs="" | ||||
|      local nodeip="$(tr -d '[]' <<< $NODEIP)"     # for displaying IPv6 addresses we don't need [] | ||||
|  | ||||
|  | ||||
| @@ -12190,9 +12190,10 @@ display_rdns_etc() { | ||||
|                if [[ "$ip" == "$NODEIP" ]] || [[ "[$ip]" == "$NODEIP" ]]; then | ||||
|                     continue | ||||
|                else | ||||
|                     out " $ip" | ||||
|                     further_ip_addrs+="$ip " | ||||
|                fi | ||||
|           done | ||||
|           out_row_aligned_max_width "$further_ip_addrs" "                         " $TERM_WIDTH out | ||||
|           outln | ||||
|      fi | ||||
|      if "$LOCAL_A"; then | ||||
| @@ -12201,7 +12202,8 @@ display_rdns_etc() { | ||||
|           outln " A record via           $CORRECT_SPACES supplied IP \"$CMDLINE_IP\"" | ||||
|      fi | ||||
|      if [[ -n "$rDNS" ]]; then | ||||
|           printf " %-23s %s" "rDNS ($nodeip):" "$rDNS" | ||||
|           printf " %-23s %s" "rDNS ($nodeip):" | ||||
|           out_row_aligned_max_width "$rDNS" "                         " $TERM_WIDTH out | ||||
|      fi | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 David Cooper
					David Cooper