Created
November 17, 2014 09:45
-
-
Save bararchy/d3781050a00dbe013488 to your computer and use it in GitHub Desktop.
CRIME check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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