certspotter
certspotter copied to clipboard
Occasional errors with the script argument
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
.