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:
@@ -82,6 +82,7 @@ def main():
|
||||
target=fake_dns.main,
|
||||
kwargs={
|
||||
"port": args.dns_port,
|
||||
"ip_dict": ip_dict,
|
||||
}
|
||||
)
|
||||
]
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user