diff --git a/HTML_GENERATING_CODE/__pycache__/generate_amitt_ttps.cpython-38.pyc b/HTML_GENERATING_CODE/__pycache__/generate_amitt_ttps.cpython-38.pyc
index 93f7dde..63d0fae 100644
Binary files a/HTML_GENERATING_CODE/__pycache__/generate_amitt_ttps.cpython-38.pyc and b/HTML_GENERATING_CODE/__pycache__/generate_amitt_ttps.cpython-38.pyc differ
diff --git a/HTML_GENERATING_CODE/generate_amitt_ttps.py b/HTML_GENERATING_CODE/generate_amitt_ttps.py
index 33aac81..a253cbb 100644
--- a/HTML_GENERATING_CODE/generate_amitt_ttps.py
+++ b/HTML_GENERATING_CODE/generate_amitt_ttps.py
@@ -279,7 +279,7 @@ class Amitt:
# table_string += row_string.format(row['responsetype'], row['id'], row['name'])
return table_string
- def create_tactic_file(self, tactic_id):
+ def create_counter_tactic_file(self, tactic_id, datadir):
''' create a file summarising the counter techniques for a given tactic name
Inside this file is:
@@ -289,8 +289,8 @@ class Amitt:
For all counters that are listed for this tactic
'''
- if not os.path.exists('../counter_tactics'):
- os.makedirs('../counter_tactics')
+ if not os.path.exists(datadir):
+ os.makedirs(datadir)
# Populate a list of counters for this tactic, listed by response type
html = '''# Tactic {} {} counters\n\n'''.format(tactic_id, self.tactics[tactic_id])
@@ -606,6 +606,9 @@ function handleTechniqueClick(box) {
For all counters that are listed for this tactic
'''
+ datadirname = 'counter_tactics'
+ datadir = '../' + datadirname
+
coacounts = pd.pivot_table(self.df_counters[['tactic_id', 'responsetype',
'id']], index='responsetype', columns='tactic_id', aggfunc=len, fill_value=0)
@@ -617,9 +620,9 @@ function handleTechniqueClick(box) {
'''
#Table heading = tactic names
for col in coacounts.columns.get_level_values(1):
- tid = self.create_tactic_file(col)
- html += '
{1} | \n'.format(
- tid, col)
+ tid = self.create_counter_tactic_file(col, datadir)
+ html += '{2} | \n'.format(
+ datadir, tid, col)
html += '\n'
# number of counters per response type
@@ -667,7 +670,8 @@ function handleTechniqueClick(box) {
coltype = 'responsetype'
rowtype = 'metatechnique'
rowname = 'metatag'
- datadir = '../metatechniques'
+ datadirname = 'metatechniques'
+ datadir = '../' + datadirname
mtcounts = pd.pivot_table(self.df_counters[[coltype, rowtype,'id']],
index=rowtype, columns=coltype, aggfunc=len,
fill_value=0)
@@ -690,8 +694,8 @@ function handleTechniqueClick(box) {
os.makedirs(datadir)
for index, counts in mtcounts.iterrows():
tid = self.create_object_file(index, rowtype, datadir)
- html += '| {2} | \n'.format(
- rowname, tid, index)
+ html += '{2} | \n'.format(
+ datadirname, tid, index)
for val in counts.values:
html += '{} | \n'.format(val)
html += '
\n\n'
@@ -734,7 +738,8 @@ function handleTechniqueClick(box) {
coltype = 'responsetype'
rowtype = 'resource'
rowname = 'resource'
- datadir = '../resources_needed'
+ datadirname = 'resources_needed'
+ datadir = '../' + datadirname
html = '''# AMITT {} courses of action
@@ -755,8 +760,8 @@ function handleTechniqueClick(box) {
for index in self.cross_counterid_resource['resource'].value_counts().sort_index().index:
(oid, omatrix) = self.create_resource_file(index, rowtype, datadir) #self
row = pd.DataFrame(omatrix.apply(len), index=colvals).fillna(' ')
- html += '| {2} | \n'.format(
- rowname, oid, index)
+ html += '{2} | \n'.format(
+ datadirname, oid, index)
if len(row.columns) > 0:
for val in row[0].to_list():
html += '{} | \n'.format(val)
diff --git a/metatechniques_by_responsetype_table.md b/metatechniques_by_responsetype_table.md
index f47f9b6..58d1674 100644
--- a/metatechniques_by_responsetype_table.md
+++ b/metatechniques_by_responsetype_table.md
@@ -11,7 +11,7 @@
D6 Destroy |
D7 Deter |
TOTALS |
-| cleaning |
+cleaning |
0 |
2 |
1 |
@@ -22,7 +22,7 @@
4 |
-| countermessaging |
+countermessaging |
0 |
3 |
8 |
@@ -33,7 +33,7 @@
17 |
-| data pollution |
+data pollution |
0 |
0 |
1 |
@@ -44,7 +44,7 @@
6 |
-| daylight |
+daylight |
0 |
6 |
8 |
@@ -55,7 +55,7 @@
19 |
-| dilution |
+dilution |
0 |
0 |
5 |
@@ -66,7 +66,7 @@
6 |
-| diversion |
+diversion |
0 |
2 |
10 |
@@ -77,7 +77,7 @@
17 |
-| friction |
+friction |
0 |
13 |
7 |
@@ -88,7 +88,7 @@
26 |
-| metatechnique |
+metatechnique |
4 |
3 |
6 |
@@ -99,7 +99,7 @@
16 |
-| reduce resources |
+reduce resources |
0 |
2 |
1 |
@@ -110,7 +110,7 @@
4 |
-| removal |
+removal |
0 |
15 |
4 |
@@ -121,7 +121,7 @@
19 |
-| resilience |
+resilience |
0 |
10 |
7 |
@@ -132,7 +132,7 @@
28 |
-| scoring |
+scoring |
0 |
7 |
0 |
@@ -143,7 +143,7 @@
10 |
-| targeting |
+targeting |
0 |
1 |
6 |
@@ -154,7 +154,7 @@
11 |
-| verification |
+verification |
0 |
2 |
1 |
diff --git a/resources_by_responsetype_table.md b/resources_by_responsetype_table.md
index e47d1c5..d65c227 100644
--- a/resources_by_responsetype_table.md
+++ b/resources_by_responsetype_table.md
@@ -11,7 +11,7 @@
D6 Destroy |
D7 Deter |
TOTALS |
-| DHS |
+DHS |
|
|
|
@@ -21,7 +21,7 @@
|
|
-| NGO |
+NGO |
|
|
|
@@ -31,7 +31,7 @@
|
|
-| activists |
+activists |
|
|
1.0 |
@@ -41,7 +41,7 @@
|
|
-| adtech |
+adtech |
|
|
1.0 |
@@ -51,7 +51,7 @@
|
|
-| civil_society |
+civil_society |
|
|
1.0 |
@@ -61,7 +61,7 @@
|
|
-| community_groups |
+community_groups |
|
|
|
@@ -71,7 +71,7 @@
|
|
-| companies |
+companies |
|
|
1.0 |
@@ -81,7 +81,7 @@
|
|
-| content_creators |
+content_creators |
|
|
|
@@ -91,7 +91,7 @@
|
|
-| data_scientist |
+data_scientist |
|
2.0 |
|
@@ -101,7 +101,7 @@
|
|
-| datastreams |
+datastreams |
|
1.0 |
|
@@ -111,7 +111,7 @@
|
|
-| developers |
+developers |
|
1.0 |
|
@@ -121,7 +121,7 @@
|
|
-| educators |
+educators |
|
6.0 |
3.0 |
@@ -131,7 +131,7 @@
|
|
-| elves |
+elves |
|
|
|
@@ -141,7 +141,7 @@
|
|
-| factcheckers |
+factcheckers |
|
2.0 |
|
@@ -151,7 +151,7 @@
|
|
-| funding |
+funding |
|
1.0 |
|
@@ -161,7 +161,7 @@
|
|
-| gamesdesigners |
+gamesdesigners |
|
1.0 |
|
@@ -171,7 +171,7 @@
|
|
-| government |
+government |
|
1.0 |
5.0 |
@@ -181,7 +181,7 @@
1.0 |
|
-| government:policymakers |
+government:policymakers |
|
4.0 |
4.0 |
@@ -191,7 +191,7 @@
|
|
-| influencers |
+influencers |
|
2.0 |
1.0 |
@@ -201,7 +201,7 @@
|
|
-| influencers:trusted_authority |
+influencers:trusted_authority |
|
|
1.0 |
@@ -211,7 +211,7 @@
|
|
-| infosec |
+infosec |
|
1.0 |
1.0 |
@@ -221,7 +221,7 @@
|
|
-| libraries |
+libraries |
|
|
|
@@ -231,7 +231,7 @@
|
|
-| media |
+media |
|
2.0 |
4.0 |
@@ -241,7 +241,7 @@
|
|
-| military |
+military |
|
|
1.0 |
@@ -251,7 +251,7 @@
|
|
-| money |
+money |
|
|
2.0 |
@@ -261,7 +261,7 @@
|
|
-| platform_admin |
+platform_admin |
|
6.0 |
3.0 |
@@ -271,7 +271,7 @@
|
|
-| platform_admin:adtech |
+platform_admin:adtech |
|
1.0 |
|
@@ -281,7 +281,7 @@
|
|
-| platform_admin:fundingsites |
+platform_admin:fundingsites |
|
1.0 |
|
@@ -291,7 +291,7 @@
|
|
-| platform_admin:socialmedia |
+platform_admin:socialmedia |
|
4.0 |
|
@@ -301,7 +301,7 @@
|
|
-| platform_algorithms |
+platform_algorithms |
|
2.0 |
2.0 |
@@ -311,7 +311,7 @@
|
|
-| platform_outreach |
+platform_outreach |
|
|
|
@@ -321,7 +321,7 @@
|
|
-| platforms |
+platforms |
|
|
|
@@ -331,7 +331,7 @@
1.0 |
|
-| public |
+public |
|
1.0 |
2.0 |
@@ -341,7 +341,7 @@
|
|
-| public:account_owners |
+public:account_owners |
|
|
|
@@ -351,7 +351,7 @@
|
|
-| religious_organisations |
+religious_organisations |
|
|
|
@@ -361,7 +361,7 @@
|
|
-| schools |
+schools |
|
|
|
@@ -371,7 +371,7 @@
|
|
-| server_admin |
+server_admin |
|
1.0 |
|
diff --git a/tactics_by_responsetype_table.md b/tactics_by_responsetype_table.md
index 2ed588d..9f116ba 100644
--- a/tactics_by_responsetype_table.md
+++ b/tactics_by_responsetype_table.md
@@ -3,18 +3,18 @@