require 'socket' if (dest=ARGV.shift||'www.google.co.jp')=~/(.+):(.+)/ then host,port=$1,$2 else host,port=dest,80 end obj=ARGV.shift||'/' TCPSocket.open(host,port) do |s| s.puts "GET #{obj} HTTP/1.0" ; s.puts while s.gets do puts $_ end end