Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Perform a DNS query with Ruby
# requires net-dns gem
# query defaults to A record
require 'net/dns'
res =
packet = res.query("")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.