SSLMate / certspotter

Certificate Transparency Log Monitor
https://sslmate.com/certspotter
Mozilla Public License 2.0
955 stars 83 forks source link

Occasional errors with the script argument #32

Closed lightswitch05 closed 1 year ago

lightswitch05 commented 5 years ago

I'm running certspotter using the script argument. I see occasional errors pop up:

certspotter: ct.googleapis.com/pilot: 2018/09/01 13:33:44 Failed to execute script: ./log_lines.sh: fork/exec ./log_lines.sh: invalid argument

My script is extremely simple, so I think this error is from the $DNS_NAMES argument and not something within my script, but I could be wrong.

usage

certspotter -watchlist ./.certspotter/watchlist.txt -no_save -state_dir ./.certspotter -script ./log_lines.sh

log_lines.sh

#!/usr/bin/env bash

FILE_PREFIX="dns_names"

IFS=',' read -ra ADDR <<< "$DNS_NAMES"
FILE_ENDING=`date +%Y-%m-%d:%H`
for i in "${ADDR[@]}"; do
    echo "$i" >> "${FILE_PREFIX}_${FILE_ENDING}.txt"
done

watchlist.txt

.