mirror of
https://github.com/Pennyw0rth/NetExec
synced 2026-06-06 16:34:30 +00:00
Merge pull request #725 from Mojo8898/main
Fixing --generate-hosts-file smb option
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user