2018-01-14 20:11:29 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Download from the goidirectory website
|
2018-12-25 10:52:32 +00:00
|
|
|
for i in $(seq 1 14648); do
|
2018-01-14 20:11:29 +00:00
|
|
|
echo $i
|
|
|
|
curl -s "http://goidirectory.nic.in/sitecounter.php?id=$i" |grep '<meta http-equiv="refresh"' >> urls.raw.txt
|
|
|
|
done
|
|
|
|
|
|
|
|
# Get crts issued in gov.in
|
|
|
|
# TODO: This isn't as good as the censys.io export
|
|
|
|
# that pulse uses, switch to that
|
|
|
|
echo "select name_value FROM certificate_identity WHERE name_value LIKE '%.gov.in';" | psql -h crt.sh -p 5432 -U guest certwatch > crt.sh.domains.txt
|
|
|
|
|
|
|
|
cat urls.raw.txt crt.sh.domains.txt |sort -u > combined.txt
|
|
|
|
|
|
|
|
php parse.php | sort -u > domains.csv
|