From eb7b522552591f468ac8899560f1a6c1eeb92177 Mon Sep 17 00:00:00 2001 From: Mojo8898 Date: Sun, 8 Jun 2025 04:42:58 -0400 Subject: [PATCH] Fixing --generate-hosts-file smb option --- nxc/protocols/smb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nxc/protocols/smb.py b/nxc/protocols/smb.py index 64dc1615..325da7f4 100755 --- a/nxc/protocols/smb.py +++ b/nxc/protocols/smb.py @@ -169,6 +169,7 @@ class smb(connection): def enum_host_info(self): self.local_ip = self.conn.getSMBServer().get_socket().getsockname()[0] + self.is_host_dc() try: self.conn.login("", "") @@ -190,7 +191,7 @@ class smb(connection): else: try: # If we know the host is a DC we can still get the hostname over LDAP if NTLM is not available - if self.is_host_dc() and detect_if_ip(self.host): + if self.isdc and detect_if_ip(self.host): self.hostname, self.domain = LDAPResolution(self.host).get_resolution() self.targetDomain = self.domain # If we can't authenticate with NTLM and the target is supplied as a FQDN we must parse it