Crypt0s / FakeDns

A regular-expression based python MITM DNS server with support for DNS Rebinding attacks
MIT License
549 stars 149 forks source link

NoneFound rule doesn't work on AAAA records #17

Closed ttyridal closed 6 years ago

ttyridal commented 6 years ago

guess this minimal patch would do

diff --git a/fakedns.py b/fakedns.py
index db720ef..e8c5a54 100755
--- a/fakedns.py
+++ b/fakedns.py
@@ -419,6 +419,9 @@ class RuleEngine2:
                 if rule_type.upper() == "AAAA":
                     tmp_ip_array = []
                     for ip in ips:
+                        if ip.lower() == 'none':
+                            tmp_ip_array.append(ip)
+                            continue
                         if _is_shorthand_ip(ip):
                             ip = _explode_shorthand_ip_string(ip)
Crypt0s commented 6 years ago

Thank you for filing this as an issue and helping to fix it! I've fixed it using the patch in this ticket.