Skip to content

Commit dece6b0

Browse files
committed
Catch dns resolver issue when domain can't be resolved
1 parent bb668ca commit dece6b0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

nxc/protocols/ldap.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1648,7 +1648,11 @@ def bloodhound(self):
16481648
self.logger.highlight("Resolved collection methods: " + ", ".join(list(collect)))
16491649

16501650
self.logger.debug("Using DNS to retrieve domain information")
1651-
ad.dns_resolve(domain=self.domain)
1651+
try:
1652+
ad.dns_resolve(domain=self.domain)
1653+
except resolver.LifetimeTimeout:
1654+
self.logger.fail("Bloodhound-python failed to resolve domain information, try specifying the DNS server.")
1655+
return None
16521656

16531657
if self.args.kerberos:
16541658
self.logger.highlight("Using kerberos auth without ccache, getting TGT")

0 commit comments

Comments
 (0)