Skip to content

Instantly share code, notes, and snippets.

@Madic- Madic-/tlsanalysis
Created Jan 20, 2018

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.