Skip to content

Instantly share code, notes, and snippets.

@bararchy
Created November 17, 2014 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bararchy/d3781050a00dbe013488 to your computer and use it in GitHub Desktop.
Save bararchy/d3781050a00dbe013488 to your computer and use it in GitHub Desktop.
CRIME check
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)
if results =~ /Secure Renegotiation IS supported/i
renegotiation = "Secured Renegotiation".colorize(:green)
end
if results =~ /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