new to dnspython and notify

268 views
Skip to first unread message

Brett Carr

unread,
Aug 12, 2015, 12:54:31 PM8/12/15
to dnspython-users
I'm quite new to python and very new to dnspython and in fact at the moment I am trying to decide on whether I should go down the route of dnspython or dnsruby, opinions on that are very welcome (assuming any of you have tried both) For the moment I am interested in how easy it is to send a notify using dnspython can anybody show me how this would be done please. Is dnspython still under active development (I don't believe dnsruby is)

Thanks

Brett

Anand Buddhdev

unread,
Aug 12, 2015, 1:39:43 PM8/12/15
to Brett Carr, dnspython-users, ana...@ripe.net
On 12/08/15 18:54, Brett Carr wrote:

Hi Brett,
I can't comment on dnsruby, as I've never really used ruby. However,
dnspython is quite nice and easy to use. Doing notify from it is
trivial, for example:

import dns.message
import dns.rdatatype
import dns.opcode
import dns.flags
import dns.query

notify = dns.message.make_query('zonename', dns.rdatatype.SOA)
notify.set_opcode(dns.opcode.NOTIFY)
notify.flags -= dns.flags.RD

response = dns.query.udp(notify, '1.2.3.4', timeout=5)

You can then examine "response" to see the client's response to the
notify message.

Regards,
Anand

Brett

unread,
Aug 13, 2015, 7:13:44 PM8/13/15
to dnspython-users
Hi,

Thanks Anand this worked a 'treat' if anybody has any other interesting/useful dns python examples I'd love to see them.
Also very interested to here dns python vs dns ruby opinions.



--
Brett
Reply all
Reply to author
Forward
0 new messages