cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

How to extract Address from DNS::Answer ??

Azzeddine_S
Cirrus
Cirrus

Hi all i

am trying to extract from a DNS:answer ony the IP address of the record by spliting the answer using "} {" spliting delimiter but it seems that using both of these caracters is not possible.

is there any way to use them, or may be a more optimal way to get IP address of the record answers.

thanks

1 ACCEPTED SOLUTION

Azzeddine_S
Cirrus
Cirrus
Here is the answer
 
when DNS_RESPONSE {
 
         set records [DNS::answer]
     
         foreach record $records {
    
               log local0. "The IP address for the FQDN [DNS::question name]  is [DNS::rdata $record]"
   
  }
}

View solution in original post

1 REPLY 1

Azzeddine_S
Cirrus
Cirrus
Here is the answer
 
when DNS_RESPONSE {
 
         set records [DNS::answer]
     
         foreach record $records {
    
               log local0. "The IP address for the FQDN [DNS::question name]  is [DNS::rdata $record]"
   
  }
}