Skip to content

Commit

Permalink
fix: AD Miner crash due tu wrongly formatted strings
Browse files Browse the repository at this point in the history
  • Loading branch information
snowpeacock committed Jun 19, 2024
1 parent 1859718 commit db44242
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ad_miner/sources/modules/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -1551,8 +1551,8 @@ def genGroupAnomalyAcl(self, domain):
if "No data to show" not in u['List of computers']:
count = int(
u["List of computers"][
u["List of computers"].find("'>", 120)
+ 2 : u["List of computers"].find("computer", 120)
u["List of computers"].find("'>", 55)
+ 2 : u["List of computers"].find("computer", 105)
].strip()
)
tmp_dict["Computers admin"] = grid_data_stringify({
Expand Down Expand Up @@ -1627,10 +1627,10 @@ def genHasSIDHistory(self):
for u in self.users_admin_of_computers:
if row['Has SID History'] in u['User']:
row['Admin of'] = u['List of computers']
origin_count = int(u['List of computers'][u['List of computers'].find("'>", 55)+2:u['List of computers'].find('computer')].strip())
origin_count = int(u['List of computers'][u['List of computers'].find("'>", 55)+2:u['List of computers'].find('computer', 105)].strip())
if row['Target'] in u['User']:
row['admin of'] = u['List of computers']
target_count = int(u['List of computers'][u['List of computers'].find("'>", 55)+2:u['List of computers'].find('computer')].strip())
target_count = int(u['List of computers'][u['List of computers'].find("'>", 55)+2:u['List of computers'].find('computer', 105)].strip())

# add user icons
type_label_a = generic_formating.clean_label(row['Type_a'])
Expand Down

0 comments on commit db44242

Please sign in to comment.