Hi guys,
I was wondering if there is any way to find out all the Nameservers a
domain is mapped to.
Example: www.google.com
Name Servers:
ns1.google.com
ns2.google.com
ns3.google.com
ns4.google.com
Is there any way i could do this in Ruby??
···
--
Posted via http://www.ruby-forum.com/.
quoth the Vinay Beckham:
Hi guys,
I was wondering if there is any way to find out all the Nameservers a
domain is mapped to.
Example: www.google.com
Name Servers:
ns1.google.com
ns2.google.com
ns3.google.com
ns4.google.com
Is there any way i could do this in Ruby??
Try resolv.rb:
require 'resolv'
a =
dns = Resolv::DNS.new
dns.getresources("google.com", Resolv::DNS::Resource::IN::NS).collect {|n| a
<< n.name.to_s }
p a
=> ["ns1.google.com", "ns2.google.com", "ns3.google.com", "ns4.google.com"]
-d
···
--
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972