Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 38 lines (30 sloc) 0.754 kB
#!/usr/bin/env ruby -wKU
require 'optparse'
require 'rubygems'
require 'whois'
opts = OptionParser.new do |opts|
opts.banner = "Whois: an intelligent pure Ruby Whois client"
opts.define_head "Usage: whois [options] object"
opts.separator ""
opts.separator "Examples:"
opts.separator " whois ruby-lang.com"
opts.separator " whois 213.149.247.64"
opts.separator ""
opts.separator "Options:"
opts.on_tail("--help", "Show this message") do
puts opts
exit
end
opts.on_tail("-V", "--version", "Show version") do
puts "#{Whois::NAME} #{Whois::VERSION}"
exit
end
end
opts.parse!
qstring = ARGV.shift
if qstring.to_s.strip.empty?
puts opts
exit 1
end
@client = Whois::Client.new
puts @client.query(qstring)
Jump to Line
Something went wrong with that request. Please try again.