X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=djbdns%2Fdnscache.py;h=785121b65d0541d04005654ebf0c59a7a7144dd7;hb=c965f2fea1788a7faba2c67a4f05c27d5c34373b;hp=a7fc56d3abb3a67066574ca09e78acd14dd470e6;hpb=ec25d9f12cd94407476a2d12c6ae31ee8ab90945;p=djbdns-logparse.git diff --git a/djbdns/dnscache.py b/djbdns/dnscache.py index a7fc56d..785121b 100644 --- a/djbdns/dnscache.py +++ b/djbdns/dnscache.py @@ -287,9 +287,11 @@ def handle_dnscache_log(line : str) -> Optional[str]: decode_ttl(words, 1) if words[2] not in ("cname", "mx", "ns", "ptr", "soa"): decode_type(words, 2) - if words[2] == "a": # decode answer to an A query + if words[2] == "a": + # Decode the response to an 'A' query decode_ip(words, 4) - if words[2] == "txt": # text record + if words[2] == "txt": + # Decode the TXT record's data from hex to ASCII. response = words[4] if response.endswith("..."): ellipsis = "..."