View | Details | Raw Unified | Return to bug 664 | Differences between
and this patch

Collapse All | Expand All

(-)b/libunbound/python/examples/async-lookup.py (-2 / +2 lines)
 Lines 40-48   ctx = unbound.ub_ctx() Link Here 
40
ctx.resolvconf("/etc/resolv.conf")
40
ctx.resolvconf("/etc/resolv.conf")
41
41
42
def call_back(my_data,status,result):
42
def call_back(my_data,status,result):
43
    print("Call_back:", my_data)
43
    print("Call_back:", sorted(my_data))
44
    if status == 0 and result.havedata:
44
    if status == 0 and result.havedata:
45
        print("Result:", result.data.address_list)
45
        print("Result:", sorted(result.data.address_list))
46
        my_data['done_flag'] = True
46
        my_data['done_flag'] = True
47
47
48
48
(-)b/libunbound/python/examples/dns-lookup.py (-1 / +1 lines)
 Lines 40-45   ctx.resolvconf("/etc/resolv.conf") Link Here 
40
40
41
status, result = ctx.resolve("www.nic.cz", unbound.RR_TYPE_A, unbound.RR_CLASS_IN)
41
status, result = ctx.resolve("www.nic.cz", unbound.RR_TYPE_A, unbound.RR_CLASS_IN)
42
if status == 0 and result.havedata:
42
if status == 0 and result.havedata:
43
    print("Result:", result.data.address_list)
43
    print("Result:", sorted(result.data.address_list))
44
elif status != 0:
44
elif status != 0:
45
    print("Error:", unbound.ub_strerror(status))
45
    print("Error:", unbound.ub_strerror(status))
(-)b/libunbound/python/examples/dnssec-valid.py (-1 / +1 lines)
 Lines 49-55   if os.path.isfile("keys"): Link Here 
49
status, result = ctx.resolve("www.nic.cz", RR_TYPE_A, RR_CLASS_IN)
49
status, result = ctx.resolve("www.nic.cz", RR_TYPE_A, RR_CLASS_IN)
50
if status == 0 and result.havedata:
50
if status == 0 and result.havedata:
51
51
52
    print("Result:", result.data.address_list)
52
    print("Result:", sorted(result.data.address_list))
53
53
54
    if result.secure:
54
    if result.secure:
55
        print("Result is secure")
55
        print("Result is secure")
(-)b/libunbound/python/examples/dnssec_test.py (-4 / +4 lines)
 Lines 13-28   def dnssecParse(domain, rrType=RR_TYPE_A): Link Here 
13
        raise RuntimeError("Error parsing DNS packet")
13
        raise RuntimeError("Error parsing DNS packet")
14
14
15
    rrsigs = pkt.rr_list_by_type(RR_TYPE_RRSIG, ldns.LDNS_SECTION_ANSWER)
15
    rrsigs = pkt.rr_list_by_type(RR_TYPE_RRSIG, ldns.LDNS_SECTION_ANSWER)
16
    print("RRSIGs from answer:", rrsigs)
16
    print("RRSIGs from answer:", sorted(rrsigs))
17
    
17
    
18
    rrsigs = pkt.rr_list_by_type(RR_TYPE_RRSIG, ldns.LDNS_SECTION_AUTHORITY)
18
    rrsigs = pkt.rr_list_by_type(RR_TYPE_RRSIG, ldns.LDNS_SECTION_AUTHORITY)
19
    print("RRSIGs from authority:", rrsigs)
19
    print("RRSIGs from authority:", sorted(rrsigs))
20
    
20
    
21
    nsecs = pkt.rr_list_by_type(RR_TYPE_NSEC, ldns.LDNS_SECTION_AUTHORITY)
21
    nsecs = pkt.rr_list_by_type(RR_TYPE_NSEC, ldns.LDNS_SECTION_AUTHORITY)
22
    print("NSECs:", nsecs)
22
    print("NSECs:", sorted(nsecs))
23
    
23
    
24
    nsec3s = pkt.rr_list_by_type(RR_TYPE_NSEC3, ldns.LDNS_SECTION_AUTHORITY)
24
    nsec3s = pkt.rr_list_by_type(RR_TYPE_NSEC3, ldns.LDNS_SECTION_AUTHORITY)
25
    print("NSEC3s:", nsec3s)
25
    print("NSEC3s:", sorted(nsec3s))
26
    
26
    
27
    print("---")
27
    print("---")
28
28
(-)b/libunbound/python/examples/example8-1.py (-3 / +3 lines)
 Lines 43-62   status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_MX, unbound.RR_CLASS_IN) Link Here 
43
if status == 0 and result.havedata:
43
if status == 0 and result.havedata:
44
    print("Result:")
44
    print("Result:")
45
    print("      raw data:", result.data)
45
    print("      raw data:", result.data)
46
    for k in result.data.mx_list:
46
    for k in sorted(result.data.mx_list):
47
        print("      priority:%d address:%s" % k)
47
        print("      priority:%d address:%s" % k)
48
48
49
status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_A, unbound.RR_CLASS_IN)
49
status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_A, unbound.RR_CLASS_IN)
50
if status == 0 and result.havedata:
50
if status == 0 and result.havedata:
51
    print("Result:")
51
    print("Result:")
52
    print("      raw data:", result.data)
52
    print("      raw data:", result.data)
53
    for k in result.data.address_list:
53
    for k in sorted(result.data.address_list):
54
        print("      address:%s" % k)
54
        print("      address:%s" % k)
55
55
56
status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_NS, unbound.RR_CLASS_IN)
56
status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_NS, unbound.RR_CLASS_IN)
57
if status == 0 and result.havedata:
57
if status == 0 and result.havedata:
58
    print("Result:")
58
    print("Result:")
59
    print("      raw data:", result.data)
59
    print("      raw data:", result.data)
60
    for k in result.data.domain_list:
60
    for k in sorted(result.data.domain_list):
61
        print("      host: %s" % k)
61
        print("      host: %s" % k)
62
62
(-)b/libunbound/python/examples/idn-lookup.py (-3 / +3 lines)
 Lines 46-63   status, result = ctx.resolve(u"www.háčkyčárky.cz", unbound.RR_TYPE_A, unboun Link Here 
46
if status == 0 and result.havedata:
46
if status == 0 and result.havedata:
47
    print("Result:")
47
    print("Result:")
48
    print("      raw data:", result.data)
48
    print("      raw data:", result.data)
49
    for k in result.data.address_list:
49
    for k in sorted(result.data.address_list):
50
        print("      address:%s" % k)
50
        print("      address:%s" % k)
51
51
52
status, result = ctx.resolve(u"háčkyčárky.cz", unbound.RR_TYPE_MX, unbound.RR_CLASS_IN)
52
status, result = ctx.resolve(u"háčkyčárky.cz", unbound.RR_TYPE_MX, unbound.RR_CLASS_IN)
53
if status == 0 and result.havedata:
53
if status == 0 and result.havedata:
54
    print("Result:")
54
    print("Result:")
55
    print("      raw data:", result.data)
55
    print("      raw data:", result.data)
56
    for k in result.data.mx_list_idn:
56
    for k in sorted(result.data.mx_list_idn):
57
        print("      priority:%d address:%s" % k)
57
        print("      priority:%d address:%s" % k)
58
58
59
status, result = ctx.resolve(unbound.reverse('217.31.204.66')+'.in-addr.arpa', unbound.RR_TYPE_PTR, unbound.RR_CLASS_IN)
59
status, result = ctx.resolve(unbound.reverse('217.31.204.66')+'.in-addr.arpa', unbound.RR_TYPE_PTR, unbound.RR_CLASS_IN)
60
if status == 0 and result.havedata:
60
if status == 0 and result.havedata:
61
    print("Result.data:", result.data)
61
    print("Result.data:", result.data)
62
    for k in result.data.domain_list_idn:
62
    for k in sorted(result.data.domain_list_idn):
63
        print("      dname:%s" % k)
63
        print("      dname:%s" % k)
(-)b/libunbound/python/examples/mx-lookup.py (-2 / +2 lines)
 Lines 43-54   status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_MX, unbound.RR_CLASS_IN) Link Here 
43
if status == 0 and result.havedata:
43
if status == 0 and result.havedata:
44
    print("Result:")
44
    print("Result:")
45
    print("      raw data:", result.data)
45
    print("      raw data:", result.data)
46
    for k in result.data.mx_list:
46
    for k in sorted(result.data.mx_list):
47
        print("      priority:%d address:%s" % k)
47
        print("      priority:%d address:%s" % k)
48
48
49
status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_A, unbound.RR_CLASS_IN)
49
status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_A, unbound.RR_CLASS_IN)
50
if status == 0 and result.havedata:
50
if status == 0 and result.havedata:
51
    print("Result:")
51
    print("Result:")
52
    print("      raw data:", result.data)
52
    print("      raw data:", result.data)
53
    for k in result.data.address_list:
53
    for k in sorted(result.data.address_list):
54
        print("      address:%s" % k)
54
        print("      address:%s" % k)
(-)b/libunbound/python/examples/ns-lookup.py (-1 / +1 lines)
 Lines 43-48   status, result = ctx.resolve("vutbr.cz", unbound.RR_TYPE_NS, unbound.RR_CLASS_IN Link Here 
43
if status == 0 and result.havedata:
43
if status == 0 and result.havedata:
44
    print("Result:")
44
    print("Result:")
45
    print("      raw data:", result.data)
45
    print("      raw data:", result.data)
46
    for k in result.data.domain_list:
46
    for k in sorted(result.data.domain_list):
47
        print("      host: %s" % k)
47
        print("      host: %s" % k)
48
48
(-)b/libunbound/python/examples/reverse-lookup.py (-2 / +1 lines)
 Lines 40-44   ctx.resolvconf("/etc/resolv.conf") Link Here 
40
40
41
status, result = ctx.resolve(unbound.reverse("74.125.43.147") + ".in-addr.arpa.", unbound.RR_TYPE_PTR, unbound.RR_CLASS_IN)
41
status, result = ctx.resolve(unbound.reverse("74.125.43.147") + ".in-addr.arpa.", unbound.RR_TYPE_PTR, unbound.RR_CLASS_IN)
42
if status == 0 and result.havedata:
42
if status == 0 and result.havedata:
43
    print("Result.data:", result.data, result.data.domain_list)
43
    print("Result.data:", result.data, sorted(result.data.domain_list))
44
44
45
- 

Return to bug 664