Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 23 lines (17 sloc) 0.499 kb
#!/usr/bin/env ruby -wKU
$:.unshift(File.expand_path("../../lib", __FILE__))
require "fileutils"
require "whois"
d = ARGV.shift || raise("Missing domain")
n = ARGV.shift || raise("Missing file name")
r = Whois.query(d)
if r.parts.size == 1
r.parts.each do |part|
p = File.expand_path("../../test/fixtures/responses/#{part.host}", __FILE__)
FileUtils.mkdir_p(p)
File.open("#{p}/#{n}", "w+") { |f| f.write(part.body) }
puts "Saved #{p}/#{n}"
end
else
raise("Multipart")
end
Jump to Line
Something went wrong with that request. Please try again.