Skip to content

Instantly share code, notes, and snippets.

@nox
Created November 30, 2009 19:43
Show Gist options
  • Save nox/245676 to your computer and use it in GitHub Desktop.
Save nox/245676 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'soap/wsdlDriver'
URL = 'http://www.webservicex.net/whois.asmx?WSDL'
if ARGV.empty?
STDERR.puts "usage: #{$0} name ..."
exit 2
end
ws = SOAP::WSDLDriverFactory.new(URL).create_rpc_driver
ARGV.each do |name|
puts ws.GetWhoIS(:HostName => name).getWhoISResult
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment