Skip to content

Commit 985a988

Browse files
committed
Remove unused function
1 parent 477940e commit 985a988

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

nxc/modules/daclread.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from impacket.uuid import bin_to_string
88
from nxc.helpers.msada_guids import SCHEMA_OBJECTS, EXTENDED_RIGHTS
99
from nxc.parsers.ldap_results import parse_result_attributes
10-
from ldap3.protocol.formatters.formatters import format_sid
1110
from ldap3.utils.conv import escape_filter_chars
1211
from ldap3.protocol.microsoft import security_descriptor_control
1312
import sys
@@ -376,19 +375,6 @@ def backup(self, context):
376375
context.log.highlight("DACL backed up to %s", self.filename)
377376
self.filename = None
378377

379-
def get_user_info(self, context, sAMAccountName):
380-
"""Retrieves the SID and Distinguished Name from a sAMAccountName."""
381-
try:
382-
resp = self.connection.search(
383-
searchFilter=f"(sAMAccountName={escape_filter_chars(sAMAccountName)})",
384-
attributes=["distinguishedName", "objectSid"],
385-
)
386-
resp_parsed = parse_result_attributes(resp)[0]
387-
return resp_parsed["distinguishedName"], resp_parsed["objectSid"]
388-
except Exception:
389-
context.log.fail(f"User not found in LDAP: {sAMAccountName}")
390-
return False
391-
392378
def resolveSID(self, sid):
393379
"""Resolves a SID to its corresponding sAMAccountName."""
394380
# Tries to resolve the SID from the well known SIDs

0 commit comments

Comments
 (0)