Skip to content

Instantly share code, notes, and snippets.

@sauloperez

sauloperez/https

Created Feb 4, 2014
Embed
What would you like to do?
Test HTTPS connection from Ruby
#!/usr/bin/env ruby
# Usage: $ https <host> [path]
require 'net/https'
h = Net::HTTP.new(ARGV[0], 443)
h.use_ssl = true
h.ssl_version = :SSLv3
h.verify_mode = OpenSSL::SSL::VERIFY_PEER
h.get '#{ARGV[1]}'
puts "Fine!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment