Forum Discussion

Azzeddine_S's avatar
Mar 15, 2022

How to extract Address from DNS::Answer ??

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...
  • Azzeddine_S's avatar
    Mar 16, 2022
    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]"