Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for python 3.11 #129

Merged
merged 2 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions certipy/commands/find.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,10 @@ def security_to_bloodhound_aces(self, security: ActiveDirectorySecurity) -> List
is_inherited = rights["inherited"]
principal = self.connection.lookup_sid(sid)

standard_rights = rights["rights"].to_list()
try:
standard_rights = list(rights["rights"])
except:
standard_rights = rights["rights"].to_list()

for right in standard_rights:
aces.append(
Expand Down Expand Up @@ -1076,7 +1079,10 @@ def get_ca_permissions(self, ca: LDAPEntry):
for sid, rights in security.aces.items():
if self.hide_admins and is_admin_sid(sid):
continue
ca_rights = rights["rights"].to_list()
try:
ca_rights = list(rights["rights"])
except:
ca_rights = rights["rights"].to_list()
for ca_right in ca_rights:
if ca_right not in access_rights:
access_rights[ca_right] = [
Expand Down
5 changes: 4 additions & 1 deletion certipy/lib/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ def to_list(self):
return members

def to_str_list(self):
return list(map(lambda x: str(x), self.to_list()))
try:
return list(map(lambda x: str(x), list(self)))
except:
return list(map(lambda x: str(x), self.to_list()))

def __str__(self):
cls = self.__class__
Expand Down