Skip to content

Commit 8309947

Browse files
committed
Fix: privileged groups SID not found error
1 parent 6ce260f commit 8309947

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

nxc/protocols/ldap.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,8 @@ def check_if_admin(self):
590590
for attribute in item["attributes"]:
591591
if str(attribute["type"]) == "distinguishedName":
592592
answers.append(str("(memberOf:1.2.840.113556.1.4.1941:=" + attribute["vals"][0] + ")"))
593+
if len(answers) == 0:
594+
return
593595

594596
# 3. get member of these groups
595597
search_filter = "(&(objectCategory=user)(sAMAccountName=" + self.username + ")(|" + "".join(answers) + "))"

0 commit comments

Comments
 (0)