X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=djbdns%2Fdnscache.py;h=785121b65d0541d04005654ebf0c59a7a7144dd7;hb=0942cb75e6d2e73f81f48166053bf3bb1997cb91;hp=a7fc56d3abb3a67066574ca09e78acd14dd470e6;hpb=3e9a04d99eee9fc1e4bd28e85300770fa5f1168e;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 = "..."