Skip to content

Instantly share code, notes, and snippets.

@ik5
Forked from bararchy/ugly :(
Last active August 29, 2015 14:09
Show Gist options
  • Save ik5/369e4521e113a28a28fb to your computer and use it in GitHub Desktop.
Save ik5/369e4521e113a28a28fb to your computer and use it in GitHub Desktop.
def check_s_client
server = 'Generel Settings: '
renegotiation = 'Insecure Renegotiation'.colorize(:red)
crime = 'SSL Compression Enabled <= CRIME - CVE-2012-4929'.colorize(:red)
results = %x(echo "q" | openssl s_client -host #{@server} -port #{@port} 2> /dev/null) # why ?
case results.downcase
when 'secure renegotiation is supported'
renegotiation = 'Secured Renegotiation'.colorize(:green)
when 'compression: none'
crime = 'SSL Compression is disabled'.colorize(:green)
end
puts 'General Checks: '.bold
print server, renegotiation, "\r\n"
print server, crime, "\r\n\r\n"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment