CHips L MINI SHELL

CHips L pro

Current Path : /opt/puppetlabs/puppet/lib/ruby/gems/2.5.0/gems/httpclient-2.8.3/sample/
Upload File :
Current File : //opt/puppetlabs/puppet/lib/ruby/gems/2.5.0/gems/httpclient-2.8.3/sample/wcat.rb

#!/usr/bin/env ruby

# wcat for http-access2
# Copyright (C) 2001 TAKAHASHI Masayoshi

$:.unshift(File.join('..', 'lib'))
require 'httpclient'

if ENV['HTTP_PROXY']
  h = HTTPClient.new(ENV['HTTP_PROXY'])
else
  h = HTTPClient.new()
end

while urlstr = ARGV.shift
  response = h.get(urlstr){ |data|
    print data
  }
  p response.contenttype
  p response.peer_cert if /^https/i =~ urlstr
end

Copyright 2K16 - 2K18 Indonesian Hacker Rulez