Skip to content

Instantly share code, notes, and snippets.

@bnagy

bnagy/resolv.rb Secret

Created March 20, 2013 05:57
Show Gist options
  • Save bnagy/7087a64cc2ad2321a627 to your computer and use it in GitHub Desktop.
Save bnagy/7087a64cc2ad2321a627 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'resolv'
fail "No input file!" unless File.file? ARGV[0]
File.open( ARGV[0] ).each {|domain|
File.open( "#{ARGV[0]}.ip", 'w') {|outfile|
outfile.puts Resolv.getaddress( domain.chomp )
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment