Created
October 3, 2016 08:35
-
-
Save chirauki/a69dac6def9b641fd5540debfd89e533 to your computer and use it in GitHub Desktop.
DNS ruby
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
rname = 'test.example.com' | |
key_name = 'challenge-key' | |
key = 'ECNx9woMslMkzn5t+eR8HBLULUGh7GQ2N9N5RumbzOUKudg==' | |
update = Dnsruby::Update.new('example.com') | |
update.absent('foo.example.com.', 'A') | |
update.add('foo.example.com.', 'A', 86400, '10.1.2.3') | |
res.tsig=key_name,key | |
res.send_message(update) | |
res = Dnsruby::Resolver.new({:nameserver => 'xx.xx.xx.xx'}) | |
update = Dnsruby::Update.new('example.com') | |
update.present(rname) | |
update.delete(rname) | |
res.tsig=key_name,key | |
res.send_message(update) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment