Skip to content

Commit e5d3b66

Browse files
committed
Add comments
1 parent ee945fa commit e5d3b66

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

nxc/protocols/smb.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,13 @@ def enum_host_info(self):
236236
self.targetDomain = self.hostname
237237
else:
238238
try:
239+
# If we know the host is a DC we can still get the hostname over LDAP if NTLM is not available
239240
if self.is_host_dc() and detect_if_ip(self.host):
240241
self.hostname, self.domain = LDAPResolution(self.host).get_resolution()
241242
self.targetDomain = self.domain
242243
# If we can't authenticate with NTLM and the target is supplied as a FQDN we must parse it
243244
else:
245+
# Check if the host is a valid IP address, if not we parse the FQDN in the Exception
244246
import socket
245247
socket.inet_aton(self.host)
246248
self.logger.debug("NTLM authentication not available! Authentication will fail without a valid hostname and domain name")

0 commit comments

Comments
 (0)