python unbound client bug?

Paul Wouters paul at
Mon May 29 18:42:49 UTC 2023


$ dig txt +short

doing the same with unbound python:

import os
from unbound import ub_ctx,ub_strerror,RR_TYPE_TXT,RR_TYPE_A,RR_CLASS_IN

ctx = ub_ctx()
if os.path.isfile("/etc/unbound/dnssec-root.key"):
     ctx.add_ta_file("/etc/unbound/dnssec-root.key") #read public keys for DNSSEC verification
status, result = ctx.resolve(f"", RR_TYPE_TXT, RR_CLASS_IN)

if status == 0 and result.havedata:

$ python 

Note there is a single quote at the beginning of the string (and not at the end)

This is with python3-unbound-1.17.1-1.fc37.x86_64


More information about the Unbound-users mailing list