Deleted Added
full compact
reverse-lookup.py (249140) reverse-lookup.py (276605)
1#!/usr/bin/python
2'''
3 reverse-lookup.py: Example shows how to resolve reverse record
4
5 Authors: Zdenek Vasicek (vasicek AT fit.vutbr.cz)
6 Marek Vavrusa (xvavru00 AT stud.fit.vutbr.cz)
7
8 Copyright (c) 2008. All rights reserved.

--- 25 unchanged lines hidden (view full) ---

34'''
35import unbound
36
37ctx = unbound.ub_ctx()
38ctx.resolvconf("/etc/resolv.conf")
39
40status, result = ctx.resolve(unbound.reverse("74.125.43.147") + ".in-addr.arpa.", unbound.RR_TYPE_PTR, unbound.RR_CLASS_IN)
41if status == 0 and result.havedata:
1#!/usr/bin/python
2'''
3 reverse-lookup.py: Example shows how to resolve reverse record
4
5 Authors: Zdenek Vasicek (vasicek AT fit.vutbr.cz)
6 Marek Vavrusa (xvavru00 AT stud.fit.vutbr.cz)
7
8 Copyright (c) 2008. All rights reserved.

--- 25 unchanged lines hidden (view full) ---

34'''
35import unbound
36
37ctx = unbound.ub_ctx()
38ctx.resolvconf("/etc/resolv.conf")
39
40status, result = ctx.resolve(unbound.reverse("74.125.43.147") + ".in-addr.arpa.", unbound.RR_TYPE_PTR, unbound.RR_CLASS_IN)
41if status == 0 and result.havedata:
42 print "Result.data:", result.data, result.data.domain_list
42 print("Result.data:", result.data, result.data.domain_list)
43
43