Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env ruby
require 'resolv'
require 'httparty'
require 'timeout'
File.read('./instances.txt').each_line(chomp: true) do |domain|
Timeout.timeout(10) do
Resolv::DNS.new.getaddress(domain)
code = HTTParty.get("https://#{domain}/about").code
raise '404' if code == 404
raise '410' if code == 410
end
rescue => e
puts "#{domain} (#{e.message})"
end
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.