Created
March 25, 2017 15:02
-
-
Save terrytrent/8ad14b6993eabe26a4e2e20ce81943fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dns import query, update, tsigkeyring | |
from dns.tsig import HMAC_SHA256 | |
key='EQSVvuA/KMAa/0ugdBBLqjxgP+o5rI7y8JoJbOICpJM=' | |
bindhost='192.168.56.10' | |
ip='192.168.56.10' | |
keyring = tsigkeyring.from_text({ | |
'test.local' : key | |
}) | |
update = update.Update('test.local.', keyring=keyring, keyalgorithm=HMAC_SHA256) | |
update.replace('abc', 300, 'A', ip) | |
response = query.tcp(update, bindhost, timeout=10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment