Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: a6a56d6693
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (16 sloc) 0.389 kB
require 'rubygems' if "#{RUBY_VERSION}" < "1.9.0"
require 'net/dns'
a = ["ibm.com", "sun.com", "redhat.com"]
threads = []
for dom in a
threads << Thread.new(dom) do |domain|
res = Net::DNS::Resolver.new
res.query(domain, Net::DNS::NS).each_nameserver do |ns|
puts "Domain #{domain} has nameserver #{ns}"
end
puts ""
end
end
threads.each do |t|
t.join
end
Jump to Line
Something went wrong with that request. Please try again.