We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee945fa commit e5d3b66Copy full SHA for e5d3b66
1 file changed
nxc/protocols/smb.py
@@ -236,11 +236,13 @@ def enum_host_info(self):
236
self.targetDomain = self.hostname
237
else:
238
try:
239
+ # If we know the host is a DC we can still get the hostname over LDAP if NTLM is not available
240
if self.is_host_dc() and detect_if_ip(self.host):
241
self.hostname, self.domain = LDAPResolution(self.host).get_resolution()
242
self.targetDomain = self.domain
243
# If we can't authenticate with NTLM and the target is supplied as a FQDN we must parse it
244
245
+ # Check if the host is a valid IP address, if not we parse the FQDN in the Exception
246
import socket
247
socket.inet_aton(self.host)
248
self.logger.debug("NTLM authentication not available! Authentication will fail without a valid hostname and domain name")
0 commit comments