I am trying to loop through the file.txt
which has domains like %.google.com
and use curl
with URL crt.sh
to extract HTTPS websites subdomains from certificate.
Unfortunately it throws an error
parse error: Invalid numeric literal at line 1, column 20
script.sh
for i in $(cat file.txt); do echo""; echo "crtsh $i"; echo ""; curl -s https://crt.sh/?q\=$1\&output\=json | jq -r '.[].name_value' | sed 's/\*\.//g' | sort -u; echo ""; done