code-dumps/ruby/dnslookup.rb

7 lines
146 B
Ruby

#!/usr/bin/env ruby
require 'resolv'
require 'ipaddr'
dns = Resolv::DNS.new.getresources("blog.headdesk.me", Resolv::DNS::Resource::IN::A)
p dns