Skip to content

Ruby interface to GNU adns asynchronous-capable DNS client library (http://gnu.org/software/adns/). You must have the GNU adns library installed in order to build this module. Visit:

License

Notifications You must be signed in to change notification settings

tuladhar/adns-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This module allows Ruby programs to interface with the GNU adns library (gnu.org/software/adns/). You must have the GNU adns library version >= 1.2 installed in order to build this module.

Installation

gem install adns-ruby

Example

require 'adns'
require 'pp'

adns= ADNS::State.new   
domain= "rubygems.org"

query_list= Hash.new
query_list[adns.submit(domain, ADNS::RR::MX)]= 'MX'
query_list[adns.submit(domain, ADNS::RR::A)]= 'A'
query_list[adns.submit(domain, ADNS::RR::NS)]= 'NS'
query_list[adns.submit(domain, ADNS::RR::SOA)]= 'SOA'

for (query, rr) in query_list
	puts rr.center(20, "*")
	pp query.wait
end

More Examples

For more examples, you can browse the examples/ directory in the adns-ruby gem installation path or you can visit the github repository (github.com/tuladhar/adns-ruby) and browse the examples/ directory.

Source Code

git clone https://github.com/tuladhar/adns-ruby

About

Ruby interface to GNU adns asynchronous-capable DNS client library (http://gnu.org/software/adns/). You must have the GNU adns library installed in order to build this module. Visit:

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published