Skip to content

Instantly share code, notes, and snippets.

@jaskerr
Created February 18, 2017 00:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaskerr/7c1beaa968a8c5ea5856cb3eff19b2d2 to your computer and use it in GitHub Desktop.
Save jaskerr/7c1beaa968a8c5ea5856cb3eff19b2d2 to your computer and use it in GitHub Desktop.
Compare Alexa Top1000 DNS Results
Script I used to to compare the top 1000 sites, requires curl compiled with ares, which is included in MacOS 10.9 or you can use port install curl +ares on macports for using different dns-servers.
Get the-1m.csv from Alexa http://www.alexa.com/topsites (right hand side of page)
for i in `head -n 1000 top-1m.csv | cut -f2 -d,`; do
echo "Site: $i";
diff <(curl --ipv4 -s -v --dns-servers 66.x.x.4,66.x.x.4 --url http://$i/ 2>&1 | grep -v "0x" | grep -v "Date: ") <(curl --ipv4 -s -v --dns-servers 8.8.8.8,8.8.4.4 --url http://$i/ 2>&1 | grep -v "0x" | grep -v "Date: ");
done > 1000.diff.txt
@jaskerr
Copy link
Author

jaskerr commented Feb 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment