Code cleanup & README cleanup
This commit is contained in:
parent
605c44c767
commit
b441bf9e96
@ -3,7 +3,7 @@
|
|||||||
###### This script will attempt a [Zone Transfer](https://en.wikipedia.org/wiki/DNS_zone_transfer) on all of the [Root Nameservers](https://en.wikipedia.org/wiki/Root_name_server) and [Top-level Domains](https://en.wikipedia.org/wiki/Top-level_domain) *(TLDs)*.
|
###### This script will attempt a [Zone Transfer](https://en.wikipedia.org/wiki/DNS_zone_transfer) on all of the [Root Nameservers](https://en.wikipedia.org/wiki/Root_name_server) and [Top-level Domains](https://en.wikipedia.org/wiki/Top-level_domain) *(TLDs)*.
|
||||||
|
|
||||||
## Expectations & Legalities
|
## Expectations & Legalities
|
||||||
Please set realistic expectations when using this tool. In contemporary network configurations, AXFR requests are typically restricted, reflecting best practices in DNS security. While many nameservers now disallow AXFR requests, there may still be occasional instances where configurations permit them. Always exercise due diligence and ensure ethical use.
|
It is expected to set *realistic* expectations when using this tool. In contemporary network configurations, AXFR requests are typically restricted, reflecting best practices in DNS security. While many nameservers now disallow AXFR requests, there may still be occasional instances where configurations permit them. Always exercise due diligence and ensure ethical use.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
- [dnspython](https://pypi.org/project/dnspython/) *(`pip install dnspython`)*
|
- [dnspython](https://pypi.org/project/dnspython/) *(`pip install dnspython`)*
|
||||||
|
2
mdaxfr
2
mdaxfr
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Mass DNS AXFR - developed by acidvegas in posix shell script (https://git.acid.vegas/mdaxfr)
|
# Mass DNS AXFR (POSIX version) - developed by acidvegas (https://git.acid.vegas/mdaxfr)
|
||||||
|
|
||||||
OUTPUT_DIR="axfrout"
|
OUTPUT_DIR="axfrout"
|
||||||
mkdir -p "$OUTPUT_DIR"
|
mkdir -p "$OUTPUT_DIR"
|
||||||
|
@ -61,9 +61,9 @@ def get_tld_nameservers(tld: str) -> list:
|
|||||||
try:
|
try:
|
||||||
return [str(nameserver) for nameserver in dns.resolver.resolve(tld+'.', 'NS', lifetime=60)]
|
return [str(nameserver) for nameserver in dns.resolver.resolve(tld+'.', 'NS', lifetime=60)]
|
||||||
except dns.exception.Timeout:
|
except dns.exception.Timeout:
|
||||||
logging.warning(f"Timeout fetching nameservers for TLD: {tld}")
|
logging.warning(f'Timeout fetching nameservers for TLD: {tld}')
|
||||||
except dns.resolver.NoNameservers:
|
except dns.resolver.NoNameservers:
|
||||||
logging.warning(f"No nameservers found for TLD: {tld}")
|
logging.warning(f'No nameservers found for TLD: {tld}')
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
4
opennic
4
opennic
@ -2,15 +2,12 @@
|
|||||||
# OpenNIC AXFR - devloped by acidvegas (https://git.acid.vegas/mdaxfr)
|
# OpenNIC AXFR - devloped by acidvegas (https://git.acid.vegas/mdaxfr)
|
||||||
|
|
||||||
servers=$(curl -s 'https://api.opennicproject.org/geoip/?list&ipv=all&res=100' | grep -oE '([0-9]{1,3}(\.[0-9]{1,3}){3}|[0-9a-fA-F:]+:[0-9a-fA-F:]+)')
|
servers=$(curl -s 'https://api.opennicproject.org/geoip/?list&ipv=all&res=100' | grep -oE '([0-9]{1,3}(\.[0-9]{1,3}){3}|[0-9a-fA-F:]+:[0-9a-fA-F:]+)')
|
||||||
|
|
||||||
tlds=("bbs" "chan" "cyb" "dyn" "epic" "geek" "gopher" "indy" "libre" "neo" "null" "o" "oss" "oz" "parody" "pirate" "opennic.glue" "dns.opennic.glue")
|
tlds=("bbs" "chan" "cyb" "dyn" "epic" "geek" "gopher" "indy" "libre" "neo" "null" "o" "oss" "oz" "parody" "pirate" "opennic.glue" "dns.opennic.glue")
|
||||||
ptlds=("bazar" "bit" "coin" "emc" "lib" "fur" "ku" "te" "ti" "uu" "ko" "rm")
|
ptlds=("bazar" "bit" "coin" "emc" "lib" "fur" "ku" "te" "ti" "uu" "ko" "rm")
|
||||||
|
|
||||||
all_tlds=("${tlds[@]}" "${ptlds[@]}")
|
all_tlds=("${tlds[@]}" "${ptlds[@]}")
|
||||||
|
|
||||||
for tld in "${ptlds[@]}"; do
|
for tld in "${ptlds[@]}"; do
|
||||||
echo "Attempting zone transfer for $tld..."
|
echo "Attempting zone transfer for $tld..."
|
||||||
|
|
||||||
success=0
|
success=0
|
||||||
for server in $servers; do
|
for server in $servers; do
|
||||||
if ! output=$(dig AXFR "$tld." @"$server" 2>&1); then
|
if ! output=$(dig AXFR "$tld." @"$server" 2>&1); then
|
||||||
@ -27,7 +24,6 @@ for tld in "${ptlds[@]}"; do
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $success -eq 0 ]; then
|
if [ $success -eq 0 ]; then
|
||||||
echo "Zone transfer failed for $tld at all servers."
|
echo "Zone transfer failed for $tld at all servers."
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user