Created
October 13, 2016 20:45
-
-
Save jschneiderhan/4293fcbeca8573d0db02e48babd3a594 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'resolv' | |
Resolv::DefaultResolver.replace_resolvers( | |
[Resolv::Hosts.new, Resolv::DNS.new(nameserver: '127.0.0.1', search: ['bad1.com', 'bad2.com', 'good.com'], ndots: 5)] | |
) | |
puts Resolv.getaddress("example") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment