Skip to content

Instantly share code, notes, and snippets.

@32bitkid
Created November 10, 2009 20:19
Show Gist options
  • Save 32bitkid/231236 to your computer and use it in GitHub Desktop.
Save 32bitkid/231236 to your computer and use it in GitHub Desktop.
require 'net/http'
require 'uri'
code_sym = Hash.new("o").merge "302" => "?", "200" => ".", "404" => "x", "503" => "*"
uri = URI.parse(ARGV.first)
puts "Trying : #{uri.host} at #{uri.path}"
while(true)
begin
res = Net::HTTP.get_response(uri)
$stdout << code_sym[res.code]
res.body
rescue Exception => ex
$stdout << "T"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment