diff --git a/README.md b/README.md
@@ -20,11 +20,6 @@ I only wrote this to shit on **[this bozo](https://github.com/flotwig/TLDR-2/tre
This repostiory also contains a [pure POSIX version](./mdaxfr) for portability, aswell as a [script](./opennic) to do zone transfers on [OpenNIC TLDs](https://wiki.opennic.org/opennic/dot).
-## Todo
-- Add [Public Suffix List](https://publicsuffix.org/list/) support
-- Loop mode to run 24/7 for monitoring new TLD's
-- NSEC3 Walking features
-
___
###### Mirrors
diff --git a/axfrout/aaa.txt b/axfrout/aaa.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR aaa @37.209.192.9
+;; global options: +cmd
+; Transfer failed.
diff --git a/axfrout/aarp.txt b/axfrout/aarp.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR aarp @192.42.176.30
+;; global options: +cmd
+; Transfer failed.
diff --git a/axfrout/abb.txt b/axfrout/abb.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR abb @65.22.113.41
+;; global options: +cmd
+; Transfer failed.
diff --git a/axfrout/abbott.txt b/axfrout/abbott.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR abbott @65.22.158.41
+;; global options: +cmd
+; Transfer failed.
diff --git a/axfrout/abbvie.txt b/axfrout/abbvie.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR abbvie @103.49.83.41
+;; global options: +cmd
+; Transfer failed.
diff --git a/axfrout/abc.txt b/axfrout/abc.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR abc @192.42.175.30
+;; global options: +cmd
+; Transfer failed.
diff --git a/axfrout/able.txt b/axfrout/able.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR able @156.154.144.3
+;; global options: +cmd
+; Transfer failed.
diff --git a/axfrout/abogado.txt b/axfrout/abogado.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR abogado @156.154.174.82
+;; global options: +cmd
+; Transfer failed.
diff --git a/axfrout/abudhabi.txt b/axfrout/abudhabi.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR abudhabi @37.209.192.10
+;; global options: +cmd
+; Transfer failed.
diff --git a/axfrout/ac.txt b/axfrout/ac.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR ac @65.22.161.1
+;; global options: +cmd
+; Transfer failed.
diff --git a/axfrout/academy.txt b/axfrout/academy.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR academy @161.232.12.37
+;; global options: +cmd
+; Transfer failed.
diff --git a/axfrout/accenture.txt b/axfrout/accenture.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR accenture @192.42.173.30
+;; global options: +cmd
+; Transfer failed.
diff --git a/axfrout/accountant.txt b/axfrout/accountant.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR accountant @156.154.159.195
+;; global options: +cmd
+; Transfer failed.
diff --git a/axfrout/accountants.txt b/axfrout/accountants.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR accountants @65.22.32.31
+;; global options: +cmd
+; Transfer failed.
diff --git a/axfrout/aco.txt b/axfrout/aco.txt
@@ -0,0 +1,4 @@
+
+; <<>> DiG 9.16.22 <<>> AXFR aco @194.0.24.12
+;; global options: +cmd
+; Transfer failed.
diff --git a/dgfjkdh b/dgfjkdh
@@ -0,0 +1,2 @@
+curl https://www.internic.net/domain/root.zone | awk '$4=="NS" {print $NF}'
+
diff --git a/mdaxfr b/mdaxfr
@@ -40,3 +40,10 @@ for tld in $(curl -s 'https://data.iana.org/TLD/tlds-alpha-by-domain.txt' | tail
attempt_axfr "$tld" "$ns" "$OUTPUT_DIR/$tld.txt"
done
done
+
+# For Public Suffix List TLD nameservers
+for tld in $(curl -s https://publicsuffix.org/list/public_suffix_list.dat | grep -vE '^(//|.*[*!])' | grep '\.' | awk '{print $1}'); do
+ for ns in $(dig +short "$tld" NS); do
+ attempt_axfr "$tld" "$ns" "$OUTPUT_DIR/$tld.txt"
+ done
+done
diff --git a/mdaxfr.py b/mdaxfr.py
@@ -67,6 +67,21 @@ def get_tld_nameservers(tld: str) -> list:
return []
+def get_psl_tlds() -> list:
+ '''Download the Public Suffix List and return its contents.'''
+ data = urllib.request.urlopen('https://publicsuffix.org/list/public_suffix_list.dat').read().decode()
+ domains = []
+ for line in data.split('\n'):
+ if line.startswith('//') or not line:
+ continue
+ if '*' in line or '!' in line:
+ continue
+ if '.' not in line:
+ continue
+ domains.append(line)
+ return domains
+
+
def resolve_nameserver(nameserver: str) -> str:
'''
Resolve a nameserver to its IP address.
@@ -110,4 +125,12 @@ if __name__ == '__main__':
try:
future.result()
except Exception as e:
+ logging.error(f'Error in TLD task: {e}')
+
+ with concurrent.futures.ThreadPoolExecutor(max_workers=args.concurrency) as executor:
+ futures = [executor.submit(attempt_axfr, tld, ns, os.path.join(args.output, tld + '.txt')) for tld in get_psl_tlds() for ns in get_tld_nameservers(tld) if ns]
+ for future in concurrent.futures.as_completed(futures):
+ try:
+ future.result()
+ except Exception as e:
logging.error(f'Error in TLD task: {e}')
\ No newline at end of file
| | | | | | | | | | | | | | | | | | |