Last active
November 15, 2017 23:06
-
-
Save apatedolos/c8d67c6240cf25eb1ae6527098616a32 to your computer and use it in GitHub Desktop.
Simple testssl script
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
#!/bin/bash | |
<<"QWERTY" | |
This script is used to automate SSL certificate testing. It takes the export results of a test from nessus in csv format. | |
It will read in the name column looking for SSL but not OpenSSL and print this out to file with ":" seperator while removeing duplicates. | |
It will then run the testssl script against each line and output the results to a file. | |
QWERTY | |
if [ $# -eq 0 ];then | |
echo "Usage: $0 csv-file"; | |
exit 1; | |
fi | |
file=$1 # csv export from nessus | |
file2="ssl_to_test" | |
awk -F , '$8 ~ /SSL/ && !/OpenSSL/ {print $5":"$7}' $1 | sed 's/\"//g' | sort -u > "ssl_to_test" | |
while IFS=: read -r f1 f2 | |
do | |
# run testssl.sh using fields f1, f2 from inputfile | |
# file format IP:Port on single lines | |
outfile="testssl-$f1:$f2" | |
./testssl.sh $f1:$f2 > $outfile | |
done <"$file2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment