You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Change Tactic order on Red Team Framework Page from numerical order to rank order #5
Guessing it may have something to do with modifying the code in generate_DISARM_pages.py Something like swapping out line 528 arr[1][index] = tactic['disarm_id']
for something like arr[1][index] = tactic['rank']
Here's the full section with lines 518 to 542 for context (below).
` def create_padded_framework_table(self, title, ttp_col, tocsv=True):
# Create the master grid that we make all the framework visuals from
# cols = number of tactics
# rows = max number of techniques per tactic + 2
numrows = max(self.df_tactics[ttp_col].apply(len)) + 2
arr = [['' for i in range(self.num_tactics)] for j in range(numrows)]
for index, tactic in self.df_tactics.iterrows():
arr[0][index] = tactic['phase_id']
arr[1][index] = tactic['disarm_id']
if tactic[ttp_col] == '':
continue
for index2, technique in enumerate(tactic[ttp_col]):
arr[index2+2][index] = technique
#Save grid to file
if tocsv:
snakecase_title = title.replace(' ', '_')
csvdir = GENERATED_FILES_DIR
if not os.path.exists(csvdir):
os.makedirs(csvdir)
pd.DataFrame(arr).to_csv('{0}/{1}_ids.csv'.format(csvdir, snakecase_title), index=False, header=False)
return(arr)`
Activity
mikecommits commentedon Jul 2, 2022
May also want to make that change to the Tactics page as well, though less important visually than in the DISARM Red framework grid view above
https://github.com/DISARMFoundation/DISARMframeworks/blob/main/generated_pages/tactics_index.md
mikecommits commentedon Jul 6, 2022
Guessing it may have something to do with modifying the code in generate_DISARM_pages.py Something like swapping out line 528
arr[1][index] = tactic['disarm_id']for something like
arr[1][index] = tactic['rank']Here's the full section with lines 518 to 542 for context (below).
` def create_padded_framework_table(self, title, ttp_col, tocsv=True):
# Create the master grid that we make all the framework visuals from
# cols = number of tactics
# rows = max number of techniques per tactic + 2