]> jfr.im git - irc/freenode/Sigyn.git/commitdiff
query AAAA records in mxbl code
authorjesopo <redacted>
Mon, 23 Nov 2020 10:49:58 +0000 (10:49 +0000)
committerjesopo <redacted>
Mon, 23 Nov 2020 10:49:58 +0000 (10:49 +0000)
plugin.py

index 71a6fb33c0c260a2e81bc7728e47cfc47dd25e7e..a09cab2521f0abb15359a2801dca38b0a86e9737 100644 (file)
--- a/plugin.py
+++ b/plugin.py
@@ -1814,7 +1814,7 @@ class Sigyn(callbacks.Plugin,plugins.ChannelDBHandler):
                email in i.domains):
            found = email
        else:
-           to_resolve = [(email,'A'), (email,'MX')]
+           to_resolve = [(email,'MX'), (email,'A'), (email,'AAAA')]
            while to_resolve:
                domain, type = to_resolve.pop(0)
                try:
@@ -1828,7 +1828,10 @@ class Sigyn(callbacks.Plugin,plugins.ChannelDBHandler):
                        if type == 'MX':
                            # these come out like '10 mx.example.com'
                            record = record.split(" ", 1)[1]
-                           to_resolve.append((record, 'A'))
+                           # MX records (and their A records) are what we match on most,
+                           # so doing .insert(0, ...) means they're checked first
+                           to_resolve.insert(0, (record, 'A'))
+                           to_resolve.insert(0, (record, 'AAAA'))
 
                        if record in mxbl:
                            found = record