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??
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??
quoth the Vinay B.:
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 wrote:
quoth the Vinay B.:
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
Perfect… thnx mate
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs