A bit of code I wrote, you all might find it useful ....
A.
[CODE = bash]
#! / Bin / bash
#parse global domains from target list code
#OSINT
#argcheck
if [-z "$1"]
then
echo "No domains supplied ..."
echo "command sytax bash fdnsfind.sh domains.txt FDNS.json.gz outfile.txt"
exit
fi
if [-z "$2"]
then
echo "No FDNS.json.gz supplied ..."
echo "check this url: https://opendata.rapid7.com/sonar.fdns_v2/"
echo "command sytax bash fdnsfind.sh domains.txt FDNS.json.gz outfile.txt"
exit
fi
if [-z "$3"]
then
echo "No output file supplied ..."
echo "command sytax bash fdnsfind.sh domains.txt FDNS.json.gz outfile.txt"
exit
fi
#main loop function
echo "approx 1.1hrs running time per $(wc -l $1) domains listed"
while read line
do
VAR = $(echo $line | sed s '/\./\\\./ g')
echo "Running $VAR check now"
pv $2 | pigz -dc | grep -P "\. ($VAR) \", "| jq -r '.name' >> $3
done <$1
echo "completed with $ (wc -l $3) domains found" [/ CODE]
A.
[CODE = bash]
#! / Bin / bash
#parse global domains from target list code
#OSINT
#argcheck
if [-z "$1"]
then
echo "No domains supplied ..."
echo "command sytax bash fdnsfind.sh domains.txt FDNS.json.gz outfile.txt"
exit
fi
if [-z "$2"]
then
echo "No FDNS.json.gz supplied ..."
echo "check this url: https://opendata.rapid7.com/sonar.fdns_v2/"
echo "command sytax bash fdnsfind.sh domains.txt FDNS.json.gz outfile.txt"
exit
fi
if [-z "$3"]
then
echo "No output file supplied ..."
echo "command sytax bash fdnsfind.sh domains.txt FDNS.json.gz outfile.txt"
exit
fi
#main loop function
echo "approx 1.1hrs running time per $(wc -l $1) domains listed"
while read line
do
VAR = $(echo $line | sed s '/\./\\\./ g')
echo "Running $VAR check now"
pv $2 | pigz -dc | grep -P "\. ($VAR) \", "| jq -r '.name' >> $3
done <$1
echo "completed with $ (wc -l $3) domains found" [/ CODE]