Skip to content

Commit eb7b522

Browse files
committed
Fixing --generate-hosts-file smb option
1 parent 812c277 commit eb7b522

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

nxc/protocols/smb.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ def get_os_arch(self):
169169

170170
def enum_host_info(self):
171171
self.local_ip = self.conn.getSMBServer().get_socket().getsockname()[0]
172+
self.is_host_dc()
172173

173174
try:
174175
self.conn.login("", "")
@@ -190,7 +191,7 @@ def enum_host_info(self):
190191
else:
191192
try:
192193
# If we know the host is a DC we can still get the hostname over LDAP if NTLM is not available
193-
if self.is_host_dc() and detect_if_ip(self.host):
194+
if self.isdc and detect_if_ip(self.host):
194195
self.hostname, self.domain = LDAPResolution(self.host).get_resolution()
195196
self.targetDomain = self.domain
196197
# If we can't authenticate with NTLM and the target is supplied as a FQDN we must parse it

0 commit comments

Comments
 (0)