Using resolv.rb

B

barjunk

Can someone point me to some documentation that shows me with examples
how to use that ruby library?

I was just trying to point the resolver at a specific DNS server, but
had trouble figuring out how to do it.

I found the Resolv documentation, but non of the examples showed how
to change what dns server the resolver library used to resolve the
names.

Thanks for any pointers.

Mike B.
 
V

Vinay Beckham

Adam said:
Example ( verified ):

require 'resolv'
Resolv::DNS.open({:nameserver=>["206.13.28.12"]}) do |r|
puts r.getaddress("www.google.com")
end

-Adam

Hi Adam...
:nameserver=>["206.13.28.12"]
here the nameserver can have any LIVE IP right?? i mean i tried changing
this IP and used one of my own server IPs.. and it worked the same...
please correct me if I am going wrong ....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,264
Messages
2,571,318
Members
48,003
Latest member
coldDuece

Latest Threads

Top