Created
January 20, 2018 20:03
-
-
Save Madic-/1e2572daa62e762544d9a07713146307 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env bash | |
# Requires the following log format in nginx: | |
# log_format tls_log '$ssl_protocol $ssl_cipher $http_host $request'; | |
LOG=/var/log/nginx/tls.log | |
echo -e "TLS Protocol Usage" | |
awk '{print $1}' "$LOG" | sort | uniq -c | sort -rn | |
echo -e "\nHTTP Protocol Usage" | |
awk '{print $6}' "$LOG" | sort | uniq -c | sort -rn | |
echo -e "\nCipher Suite Usage" | |
awk '{print $2}' "$LOG" | sort | uniq -c | sort -rn | |
echo -e "\nHTTP Hosts" | |
awk '{print $3}' "$LOG" | sort | uniq -c | sort -rn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment