Skip to content

Instantly share code, notes, and snippets.

@jetpks
Created December 13, 2012 10:44
Show Gist options
  • Select an option

  • Save jetpks/4275649 to your computer and use it in GitHub Desktop.

Select an option

Save jetpks/4275649 to your computer and use it in GitHub Desktop.
Find all available 2 letter .io domain names.
#!/usr/bin/env ruby
require 'whois'
c = Whois::Client.new
('a'..'z').to_a.shuffle!.each do |starter|
('a'..'z').to_a.shuffle!.each do |ender|
#puts "Trying #{starter}#{ender}.io"
if c.query("#{starter}#{ender}.io").available?
puts "FOUND AVAILABLE!! AWESOME! : #{starter}#{ender}.io"
end
sleep(rand(1..6))
end
end
@Techbrunch
Copy link

New version:

#!/usr/bin/env ruby
require 'whois-parser'

c = Whois::Client.new

('a'..'z').to_a.shuffle!.each do |starter|
  ('a'..'z').to_a.shuffle!.each do |ender|
    #puts "Trying #{starter}#{ender}.io"
	record = Whois.whois("#{starter}#{ender}.io")
	parser = record.parser
    if parser.available?
      puts "FOUND AVAILABLE!! AWESOME! : #{starter}#{ender}.io"
    end
    sleep(rand(1..6))
  end
end

@ylluminate
Copy link

Nice little script @Techbrunch. Appreciate your sharing. Fwiw, it seems to die after about 10-20 queries fairly consistently. Not sure if they've got some kind of a limiter or what exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment