homelab-automation/scripts/ssl-compliance.sh
Benjamin Hays bd06770c7a
Some checks failed
Ansible Deploy / deploy (ansible/playbooks/debian.yml) (push) Failing after 2m23s
Ansible Deploy / deploy (ansible/playbooks/proxmox.yml) (push) Failing after 1m9s
Ansible Lint / build (push) Successful in 1m22s
fix strange folder naming error
2025-05-18 10:25:12 -04:00

25 lines
525 B
Bash
Executable File

#!/bin/sh
if [ "$#" -eq 0 ]; then
echo "Usage: $0 (--install-deps) <file-with-hosts>"
exit 1
fi
if [ "$1" = "--install-deps" ]; then
echo "[+] Installing dependencies"
pip3 install --upgrade pip setuptools wheel --break-system-packages
pip3 install --upgrade sslyze --break-system-packages
filename="$2"
else
filename="$1"
fi
if [ ! -f "$filename" ]; then
echo "Error: File '$filename' not found."
exit 1
fi
while IFS= read -r line; do
python3 -m sslyze "$line"
done < "$filename"