Created
July 15, 2016 21:15
-
-
Save staylorx/a0cfab7f679a8178cefdf45fcc8b3556 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
#!/bin/bash | |
if [[ $# -eq 0 ]]; then | |
echo "Usage: tslooper.sh hostinput.txt" | |
exit 1 | |
else | |
HOSTS="$1" | |
fi | |
rm -rf target | |
mkdir -p target | |
for LINE in $(cat $HOSTS) | |
do | |
echo "Working line $LINE" | |
#look for the host and default to 443 if a port is missing | |
HOST=$(echo "$LINE" | cut -d: -f1) | |
PORT=$(echo "$LINE" | cut -d: -f2); if [[ "$PORT" == "$HOST" ]]; then PORT="443"; fi | |
SERVER="$HOST:$PORT" | |
timeout 20 testssl/testssl.sh --quiet $SERVER | aha > target/$SERVER.html | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment