Skip to content

Commit

Permalink
DEBUG: add print of GlobalVars nameservers
Browse files Browse the repository at this point in the history
  • Loading branch information
makyen committed Nov 15, 2024
1 parent 3a8ee1e commit 559490c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,20 @@
# default resolver in it. Since this activates and initializes the DNS *long* before
# the chat or metasmoke websockets have been initiated, this is a 'safe space' to
# begin initialization of the DNS data.
default_dns_resolver = dns.resolver.get_default_resolver()
print('WS: GlobalVars.dns_nameservers:', GlobalVars.dns_nameservers)
print('WS: GlobalVars.dns_cache_enabled:', GlobalVars.dns_cache_enabled)
print('WS: dns.resolver.Cache(GlobalVars.dns_cache_interval):', dns.resolver.Cache(GlobalVars.dns_cache_interval))
print('WS: dns.resolver.Cache(GlobalVars.dns_cache_interval):', dns.resolver.Cache(GlobalVars.dns_cache_interval))
print('WS: GlobalVars.config.dns_nameservers:', GlobalVars.config.dns_nameservers)
if GlobalVars.dns_nameservers != 'system':
dns.resolver.get_default_resolver().nameservers = GlobalVars.config.dns_nameservers.split(',')
default_dns_resolver.nameservers = GlobalVars.config.dns_nameservers.split(',')

if GlobalVars.dns_cache_enabled:
dns.resolver.get_default_resolver().cache = dns.resolver.Cache(GlobalVars.dns_cache_interval)
default_dns_resolver.cache = dns.resolver.Cache(GlobalVars.dns_cache_interval)

dns.resolver.get_default_resolver().timeout = 2
dns.resolver.get_default_resolver().lifetime = 5
default_dns_resolver.timeout = 2
default_dns_resolver.lifetime = 5
dns.resolver.override_system_resolver()


Expand Down

0 comments on commit 559490c

Please sign in to comment.