From 511cdbaa1ac21c00e12bfea47ff93e00956b55d2 Mon Sep 17 00:00:00 2001 From: wil Date: Fri, 10 Jan 2025 17:47:10 +0100 Subject: [PATCH] Fix shadow principals --- VERSION | 2 +- ldeep/__main__.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index ac329bf..a747663 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.79 +1.0.80 diff --git a/ldeep/__main__.py b/ldeep/__main__.py index 58d9d29..dc53b3c 100755 --- a/ldeep/__main__.py +++ b/ldeep/__main__.py @@ -1296,9 +1296,10 @@ def list_shadow_principals(self, kwargs): self.display(entries, verbose) else: for entry in entries: - print( - f"User {entry['member'][0]} added to Group {format_sid(entry['msDS-ShadowPrincipalSid'])}" - ) + for user in entry.get("member", []): + print( + f"User {entry['member'][0]} added to Group {format_sid(entry['msDS-ShadowPrincipalSid'])}" + ) except (LDAPAttributeError, LDAPObjectClassError) as e: error( f"{e}. The domain's functional level may be too old",