summaryrefslogtreecommitdiff
path: root/techniques_table.py
diff options
context:
space:
mode:
authorW. Kosior <koszko@koszko.org>2024-12-18 09:29:49 +0100
committerW. Kosior <koszko@koszko.org>2024-12-18 09:29:49 +0100
commite7bea792e1547de86373841bd668e2d53574b2f3 (patch)
treeecf953cbc6e4b36250dcc8c8aa334dda8d4322de /techniques_table.py
parent15105955f461a5c57be66e49adcde2c31046e1cd (diff)
downloadAGH-threat-intel-course-e7bea792e1547de86373841bd668e2d53574b2f3.tar.gz
AGH-threat-intel-course-e7bea792e1547de86373841bd668e2d53574b2f3.zip
Typeset technique names as links to mitre.org.
Diffstat (limited to 'techniques_table.py')
-rw-r--r--techniques_table.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/techniques_table.py b/techniques_table.py
index bee4027..13c9212 100644
--- a/techniques_table.py
+++ b/techniques_table.py
@@ -69,12 +69,14 @@ for tid in all_tids:
group_count = sum([len(groups_by_techniques_by_origin[origin].get(tid, []))
for origin in all_origins])
+ name_href_markup = \
+ f"\\href{{https://attack.mitre.org/techniques/{tid}/}}{{{name}}}"
group_precents_markup = ' & '.join(
f"{round(technique_use_percent(tid, origin))}\\% groups"
for origin in all_origins
)
- print(f"{name} & {group_precents_markup} & {group_count} \\\\")
+ print(f"{name_href_markup} & {group_precents_markup} & {group_count} \\\\")
print("\\end{longtable}")
print("}")