Skip to content

Instantly share code, notes, and snippets.

@nmarchini
Created March 10, 2021 12:30
Show Gist options
  • Save nmarchini/9984db3ead16949d2a84bc64662bb94e to your computer and use it in GitHub Desktop.
Save nmarchini/9984db3ead16949d2a84bc64662bb94e to your computer and use it in GitHub Desktop.
Test Domain Zone Transfer for all domains in a text file
### This script runs through a list of domains in a text file called domains.txt and checks if zone transfer is enabled or disabled
## One domain per line in the for mydomain.com
## you can replace 1.1.1.1 with the DNS server to use for the checks.
#!/bin/bash
cat domains.txt | while read domain
do
echo $domain " " & dig axfr 1.1.1.1 $domain
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment