Skip to content

Commit

Permalink
adding details to adversary export
Browse files Browse the repository at this point in the history
  • Loading branch information
elegantmoose committed Apr 26, 2024
1 parent b039556 commit d0db449
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/adversaries/DetailsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,20 @@ function exportAdversary() {
yaml += `objective: ${selectedAdversary.value.objective}\n`;
yaml += `atomic_ordering:\n`;
selectedAdversaryAbilities.value.forEach((ability) => yaml += `- ${ability.ability_id}\n`);
yaml += `abilities:\n`;
selectedAdversaryAbilities.value.forEach((ability) => {
yaml += ` ${ability.ability_id}:\n`;
yaml += ` name: ${ability.name}\n`;
yaml += ` tactic: ${ability.tactic}\n`;
yaml += ` technique_name: "${ability.technique_name}"\n`;
yaml += ` technique_id: ${ability.technique_id}\n`;
yaml += ` executors: \n`;
ability.executors.forEach((executor) => {
yaml += ` - ${executor.name}:\n`;
yaml += ` platform: ${executor.platform}\n`;
yaml += ` command: |\n ${executor.command.replaceAll("\n", "\n ")}\n`;
});
});
const blob = new Blob([yaml], { type: 'application/x-yaml' })
const url = window.URL.createObjectURL(blob);
Expand Down

0 comments on commit d0db449

Please sign in to comment.