Actually pass ip_dict to FakeResolver

It wasn't being passed so the client tunnel would just fail

#4 - Investigate extending pr0xy to use SAM
This commit is contained in:
2020-12-13 20:18:29 +01:00
parent 594554b12c
commit 8026c04a7b
2 changed files with 2 additions and 2 deletions

View File

@@ -82,6 +82,7 @@ def main():
target=fake_dns.main,
kwargs={
"port": args.dns_port,
"ip_dict": ip_dict,
}
)
]

View File

@@ -65,7 +65,7 @@ class RandomResolver(BaseResolver):
_FAKER_LOCK = RLock()
def __init__(self, ip_dict=None):
if dict is None:
if ip_dict is None:
self.fqdn_dict = {}
else:
self.fqdn_dict = ReverseDict(ip_dict)
@@ -111,7 +111,6 @@ def main(port: int = 53, ip_dict=None):
:param port: On localhost to access DNS requests
:param ip_dict: A dict into which IP addresses of resolved domains will be stored
"""
ip_dict = ip_dict or {}
resolver = RandomResolver(ip_dict)
udp_server = DNSServer(resolver, port=port)