updated master
Этот коммит содержится в:
родитель
ea1e5c37ae
Коммит
bff780c2da
Двоичные данные
AMITT_MASTER_DATA/AMITT_TTPs_MASTER.xlsx
Двоичные данные
AMITT_MASTER_DATA/AMITT_TTPs_MASTER.xlsx
Двоичный файл не отображается.
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
@ -653,6 +653,15 @@ function handleTechniqueClick(box) {{
|
||||
dfw = dfw.sort_values(by='count', ascending=False)
|
||||
return(dfw)
|
||||
|
||||
|
||||
def analyse_coverage(self, technique_id_list, counter_id_list):
|
||||
ct = self.cross_counterid_techniqueid.copy()
|
||||
ct = ct[ct['technique_id'].isin(self.df_techniques['id'].to_list()) & ct['id'].isin(self.df_counters['id'].to_list())]
|
||||
possible_counters_for_techniques = ct[ct['technique_id'].isin(technique_id_list)]
|
||||
possible_techniques_for_counters = ct[ct['technique_id'].isin(counter_id_list)]
|
||||
coverage = ct[(ct['id'].isin(counter_id_list)) & (ct['technique_id'].isin(technique_id_list))]
|
||||
return coverage, possible_counters_for_techniques, possible_techniques_for_counters
|
||||
|
||||
|
||||
def write_counts_table_to_file(self, objectname, objectdict, counts_table, outfile):
|
||||
html = '''# AMITT {} courses of action
|
||||
|
||||
@ -17,19 +17,12 @@
|
||||
"updated ../amitt_blue_framework_clickable.html\n",
|
||||
"updated ../phases_index.md\n",
|
||||
"updated ../tactics_index.md\n",
|
||||
"Updating ../tactics/TA06.md\n",
|
||||
"Updating ../tactics/TA12.md\n",
|
||||
"updated ../techniques_index.md\n",
|
||||
"Updating ../techniques/T0025.md\n",
|
||||
"Updating ../techniques/T0062.md\n",
|
||||
"Updating ../techniques/T0063.md\n",
|
||||
"Updating ../techniques/T0064.md\n",
|
||||
"updated ../tasks_index.md\n",
|
||||
"Updating ../tasks/.md\n",
|
||||
"updated ../incidents_index.md\n",
|
||||
"updated ../counters_index.md\n",
|
||||
"Updating ../counters/C00194.md\n",
|
||||
"updated ../metatechniques_index.md\n",
|
||||
"Updating ../metatechniques/M001.md\n",
|
||||
"updated ../actors_index.md\n",
|
||||
"updated ../responsetype_index.md\n",
|
||||
"updated ../detections_index.md\n",
|
||||
@ -103,136 +96,6 @@
|
||||
"amitt = Amitt()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"updated ../amitt_red_framework.md\n",
|
||||
"updated ../amitt_red_framework_clickable.html\n",
|
||||
"updated ../amitt_blue_framework.md\n",
|
||||
"updated ../amitt_blue_framework_clickable.html\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"amitt.write_amitt_frameworks()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"updated ../amitt_blue_framework.md\n",
|
||||
"updated ../amitt_blue_framework_clickable.html\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"amitt.write_amitt_blue_framework_file(outfile = '../amitt_blue_framework.md')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"10"
|
||||
]
|
||||
},
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"max(amitt.df_tactics['technique_ids'].apply(len))\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"0 [T0001, T0002, T0003, T0004]\n",
|
||||
"1 [T0005, T0006]\n",
|
||||
"2 [T0007, T0008, T0009]\n",
|
||||
"3 [T0010, T0011, T0012, T0013, T0014, T0015]\n",
|
||||
"4 [T0016, T0017, T0018]\n",
|
||||
"5 [T0019, T0020, T0021, T0022, T0023, T0024, T00...\n",
|
||||
"6 [T0029, T0030, T0031, T0032, T0033, T0034, T00...\n",
|
||||
"7 [T0039, T0040, T0041, T0042, T0043, T0044, T00...\n",
|
||||
"8 [T0047, T0048, T0049, T0050, T0051, T0052, T00...\n",
|
||||
"9 [T0057, T0061]\n",
|
||||
"10 [T0058, T0059, T0060]\n",
|
||||
"11 \n",
|
||||
"Name: technique_ids, dtype: object"
|
||||
]
|
||||
},
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"amitt.df_tactics['technique_ids']"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"12"
|
||||
]
|
||||
},
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"len(amitt.padded_techniques_tactics_table)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"12"
|
||||
]
|
||||
},
|
||||
"execution_count": 10,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"amitt.max_num_techniques_per_tactic"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
@ -240,8 +103,117 @@
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<style scoped>\n",
|
||||
" .dataframe tbody tr th:only-of-type {\n",
|
||||
" vertical-align: middle;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe tbody tr th {\n",
|
||||
" vertical-align: top;\n",
|
||||
" }\n",
|
||||
"\n",
|
||||
" .dataframe thead th {\n",
|
||||
" text-align: right;\n",
|
||||
" }\n",
|
||||
"</style>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>id</th>\n",
|
||||
" <th>technique_id</th>\n",
|
||||
" <th>Weight</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>C00008</td>\n",
|
||||
" <td>TA01</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>C00008</td>\n",
|
||||
" <td>TA06</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>C00008</td>\n",
|
||||
" <td>TA08</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>C00008</td>\n",
|
||||
" <td>T0006</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>1</th>\n",
|
||||
" <td>C00008</td>\n",
|
||||
" <td>T0009</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>...</th>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" <td>...</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>120</th>\n",
|
||||
" <td>C00165</td>\n",
|
||||
" <td>T00025</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>126</th>\n",
|
||||
" <td>C00174</td>\n",
|
||||
" <td>T0001</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>138</th>\n",
|
||||
" <td>C00197</td>\n",
|
||||
" <td>T0007</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>138</th>\n",
|
||||
" <td>C00197</td>\n",
|
||||
" <td>T0011</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
" <th>140</th>\n",
|
||||
" <td>C00202</td>\n",
|
||||
" <td>T0025</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"<p>263 rows × 3 columns</p>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
"'xx'"
|
||||
" id technique_id Weight\n",
|
||||
"1 C00008 TA01 1\n",
|
||||
"1 C00008 TA06 1\n",
|
||||
"1 C00008 TA08 1\n",
|
||||
"1 C00008 T0006 1\n",
|
||||
"1 C00008 T0009 1\n",
|
||||
".. ... ... ...\n",
|
||||
"120 C00165 T00025 1\n",
|
||||
"126 C00174 T0001 1\n",
|
||||
"138 C00197 T0007 1\n",
|
||||
"138 C00197 T0011 1\n",
|
||||
"140 C00202 T0025 1\n",
|
||||
"\n",
|
||||
"[263 rows x 3 columns]"
|
||||
]
|
||||
},
|
||||
"execution_count": 13,
|
||||
@ -249,6 +221,19 @@
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"ct = amitt.cross_counterid_techniqueid\n",
|
||||
"ct['Weight'] = 1\n",
|
||||
"ct = ct[ct['technique_id'].str.len() > 0]\n",
|
||||
"ct.to_csv('../visualisations/cross_counterid_techniqueid.csv', index=False, header=['Source','Target', 'Weight'])\n",
|
||||
"ct"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Counter C00194: Provide an alternative to Russian information by expanding and improving local content.
|
||||
|
||||
* **Summary**: To effectively compete, others argue, is to develop content that can displace the pro-Russia narrative. given the importance of affecting the entire media environment, we should note that these recommendations for alternative content span both new and old media alike.
|
||||
* **Summary**: Develop content that can displace geopolitically-motivated narratives in the entire media environment, both new and old media alike.
|
||||
|
||||
* **Playbooks**:
|
||||
|
||||
|
||||
@ -1107,7 +1107,7 @@ Note: This sounds eerlily like many Reddit communities where the most upvoted co
|
||||
<tr>
|
||||
<td><a href="counters/C00194.md">C00194</a></td>
|
||||
<td>Provide an alternative to Russian information by expanding and improving local content.</td>
|
||||
<td>To effectively compete, others argue, is to develop content that can displace the pro-Russia narrative. given the importance of affecting the entire media environment, we should note that these recommendations for alternative content span both new and old media alike.</td>
|
||||
<td>Develop content that can displace geopolitically-motivated narratives in the entire media environment, both new and old media alike.</td>
|
||||
<td>M002 - diversion</td>
|
||||
<td>TA09 Exposure</td>
|
||||
<td>D3 Disrupt</td>
|
||||
|
||||
264
visualisations/cross_counterid_techniqueid.csv
Обычный файл
264
visualisations/cross_counterid_techniqueid.csv
Обычный файл
@ -0,0 +1,264 @@
|
||||
Source,Target,Weight
|
||||
C00008,TA01,1
|
||||
C00008,TA06,1
|
||||
C00008,TA08,1
|
||||
C00008,T0006,1
|
||||
C00008,T0009,1
|
||||
C00008,T0008,1
|
||||
C00008,T0013,1
|
||||
C00008,T0014,1
|
||||
C00009,TA08,1
|
||||
C00009,T0010,1
|
||||
C00009,T0029,1
|
||||
C00010,TA05,1
|
||||
C00010,T00018,1
|
||||
C00011,TA03,1
|
||||
C00011,TA04,1
|
||||
C00011,TA05,1
|
||||
C00011,TA08,1
|
||||
C00011,TA09,1
|
||||
C00011,T0059,1
|
||||
C00012,TA07,1
|
||||
C00012,TA09,1
|
||||
C00012,TA10,1
|
||||
C00012,T0002,1
|
||||
C00012,T0007,1
|
||||
C00012,T0014,1
|
||||
C00012,T0015,1
|
||||
C00012,T0025,1
|
||||
C00012,T0043,1
|
||||
C00012,T0046,1
|
||||
C00012,T0047,1
|
||||
C00012,T0048,1
|
||||
C00012,T0051,1
|
||||
C00012,T0055,1
|
||||
C00014,TA01,1
|
||||
C00014,TA06,1
|
||||
C00014,TA08,1
|
||||
C00014,T0006,1
|
||||
C00014,T0009,1
|
||||
C00014,T0008,1
|
||||
C00014,T0013,1
|
||||
C00014,T0014,1
|
||||
C00016,TA07,1
|
||||
C00016,T0043,1
|
||||
C00019,TA08,1
|
||||
C00019,TA09,1
|
||||
C00019,TA10,1
|
||||
C00021,All,1
|
||||
C00022,T0002,1
|
||||
C00024,TA01,1
|
||||
C00024,T0006,1
|
||||
C00024,T0027,1
|
||||
C00024,T0022,1
|
||||
C00024,T0023,1
|
||||
C00026,T0002,1
|
||||
C00027,TA01,1
|
||||
C00027,TA08,1
|
||||
C00027,T0006,1
|
||||
C00027,T0022,1
|
||||
C00027,T0023,1
|
||||
C00027,T0027,1
|
||||
C00027,T0047,1
|
||||
C00027,T0048,1
|
||||
C00027,T0053,1
|
||||
C00028,TA07,1
|
||||
C00028,TA08,1
|
||||
C00028,TA09,1
|
||||
C00028,TA10,1
|
||||
C00031,T0002,1
|
||||
C00031,T0003,1
|
||||
C00031,T0006,1
|
||||
C00036,T0005,1
|
||||
C00036,T0007,1
|
||||
C00036,T0017,1
|
||||
C00036,T0025,1
|
||||
C00036,T0056,1
|
||||
C00036,T0057,1
|
||||
C00040,T0009,1
|
||||
C00042,T0004,1
|
||||
C00042,T0019,1
|
||||
C00042,T0022,1
|
||||
C00042,T0027,1
|
||||
C00042,T0028,1
|
||||
C00042,T0042,1
|
||||
C00042,T0044,1
|
||||
C00042,T0056,1
|
||||
C00042,T0059,1
|
||||
C00044,TA07,1
|
||||
C00044,T0049,1
|
||||
C00044,T0054,1
|
||||
C00048,TA08,1
|
||||
C00048,T0048,1
|
||||
C00048,T0057,1
|
||||
C00048,T0061,1
|
||||
C00051,T0012,1
|
||||
C00052,T0012,1
|
||||
C00053,T0011,1
|
||||
C00053,TA06,1
|
||||
C00053,T0008,1
|
||||
C00058,T0017,1
|
||||
C00058,T0061,1
|
||||
C00060,TA07,1
|
||||
C00060,T0047,1
|
||||
C00062,All,1
|
||||
C00065,T0018,1
|
||||
C00066,T0015,1
|
||||
C00066,T0055,1
|
||||
C00067,T0017,1
|
||||
C00067,T0061,1
|
||||
C00070,T0008,1
|
||||
C00070,T0014,1
|
||||
C00070,T0015,1
|
||||
C00070,T0017,1
|
||||
C00070,T0046,1
|
||||
C00070,T0052,1
|
||||
C00070,T0055,1
|
||||
C00070,T0057,1
|
||||
C00070,T0061,1
|
||||
C00071,T0019,1
|
||||
C00071,T0056,1
|
||||
C00072,T0022,1
|
||||
C00073,T0012,1
|
||||
C00073,T0019,1
|
||||
C00073,T0056,1
|
||||
C00074,T0022,1
|
||||
C00074,T0026,1
|
||||
C00074,T0025,1
|
||||
C00076,T0021,1
|
||||
C00076,T0024,1
|
||||
C00078,TA07,1
|
||||
C00078,T0046,1
|
||||
C00078,T0021,1
|
||||
C00080,adapt,1
|
||||
C00081,info,1
|
||||
C00084,T0002,1
|
||||
C00084,T0006,1
|
||||
C00084,T0015,1
|
||||
C00084,T0017,1
|
||||
C00084,T0057,1
|
||||
C00084,T0059,1
|
||||
C00085,TA03,1
|
||||
C00085,TA04,1
|
||||
C00085,TA05,1
|
||||
C00085,TA06,1
|
||||
C00085,TA07,1
|
||||
C00085,TA08,1
|
||||
C00085,TA09,1
|
||||
C00085,TA10,1
|
||||
C00085,TA11,1
|
||||
C00086,TA09,1
|
||||
C00089,T0021,1
|
||||
C00090,T0020,1
|
||||
C00091,T0019,1
|
||||
C00092,TA07,1
|
||||
C00092,TA08,1
|
||||
C00092,T0023,1
|
||||
C00092,T0024,1
|
||||
C00092,T0025,1
|
||||
C00092,T0026,1
|
||||
C00092,T0045,1
|
||||
C00092,T0047,1
|
||||
C00092,T0053,1
|
||||
C00093,TA07,1
|
||||
C00093,T0010,1
|
||||
C00093,T0017,1
|
||||
C00093,T0039,1
|
||||
C00093,T0047,1
|
||||
C00093,T0048,1
|
||||
C00093,T0053,1
|
||||
C00094,T0026,1
|
||||
C00096,T0022,1
|
||||
C00097,T0029,1
|
||||
C00098,T0038,1
|
||||
C00099,T0030,1
|
||||
C00100,use,1
|
||||
C00101,T0029,1
|
||||
C00102,T0029,1
|
||||
C00103,T0029,1
|
||||
C00107,T0032,1
|
||||
C00107,T0035,1
|
||||
C00112,T0040,1
|
||||
C00112,T0042,1
|
||||
C00113,T0045,1
|
||||
C00114,T0039,1
|
||||
C00115,T0046,1
|
||||
C00115,T0048,1
|
||||
C00115,T0052,1
|
||||
C00115,T0053,1
|
||||
C00115,T0054,1
|
||||
C00115,T0055,1
|
||||
C00115,T0056,1
|
||||
C00116,T0041,1
|
||||
C00117,T0046,1
|
||||
C00118,T0044,1
|
||||
C00119,T0044,1
|
||||
C00120,T0047,1
|
||||
C00120,T0052,1
|
||||
C00120,T0053,1
|
||||
C00120,T0054,1
|
||||
C00120,T0055,1
|
||||
C00120,T0056,1
|
||||
C00121,T0043,1
|
||||
C00123,T0049,1
|
||||
C00123,T0051,1
|
||||
C00123,T0052,1
|
||||
C00123,T0053,1
|
||||
C00123,T0054,1
|
||||
C00123,T0055,1
|
||||
C00123,T0056,1
|
||||
C00124,TA08,1
|
||||
C00124,TA09,1
|
||||
C00125,distort,1
|
||||
C00126,T0052,1
|
||||
C00126,T0053,1
|
||||
C00126,T0054,1
|
||||
C00126,T0055,1
|
||||
C00126,T0056,1
|
||||
C00129,T0057,1
|
||||
C00129,T0061,1
|
||||
C00131,T0049,1
|
||||
C00131,T0054,1
|
||||
C00133,TA07,1
|
||||
C00133,TA09,1
|
||||
C00133,TA10,1
|
||||
C00133,T0007,1
|
||||
C00133,T0009,1
|
||||
C00133,T0011,1
|
||||
C00133,T0014,1
|
||||
C00133,T0017,1
|
||||
C00133,T0018,1
|
||||
C00133,T0045,1
|
||||
C00135,TA07,1
|
||||
C00135,TA09,1
|
||||
C00135,TA10,1
|
||||
C00135,T0007,1
|
||||
C00135,T0011,1
|
||||
C00135,T0017,1
|
||||
C00135,T0045,1
|
||||
C00136,TA08,1
|
||||
C00136,TA09,1
|
||||
C00136,TA10,1
|
||||
C00136,T0005,1
|
||||
C00136,T0010,1
|
||||
C00136,T0029,1
|
||||
C00137,T0020,1
|
||||
C00140,TA05,1
|
||||
C00140,TA09,1
|
||||
C00140,TA10,1
|
||||
C00142,TA05,1
|
||||
C00142,TA09,1
|
||||
C00142,TA10,1
|
||||
C00142,TA11,1
|
||||
C00142,T00016,1
|
||||
C00144,T0053,1
|
||||
C00145,T0015,1
|
||||
C00145,T0046,1
|
||||
C00147,T0060,1
|
||||
C00149,TA12,1
|
||||
C00149,T0020,1
|
||||
C00165,T00025,1
|
||||
C00174,T0001,1
|
||||
C00197,T0007,1
|
||||
C00197,T0011,1
|
||||
C00202,T0025,1
|
||||
|
19718
visualisations/d3.js
поставляемый
Обычный файл
19718
visualisations/d3.js
поставляемый
Обычный файл
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
80
visualisations/grid.js
Обычный файл
80
visualisations/grid.js
Обычный файл
@ -0,0 +1,80 @@
|
||||
|
||||
var gridnames = ["#bluegrid", "#redgrid"];
|
||||
|
||||
for (gridname in gridnames) {
|
||||
fillGrid(gridname)
|
||||
}
|
||||
|
||||
function fillGrid(gridname) {
|
||||
|
||||
|
||||
function gridData() {
|
||||
var data = new Array();
|
||||
var xpos = 1; //starting xpos and ypos at 1 so the stroke will show when we make the grid below
|
||||
var ypos = 1;
|
||||
var width = 50;
|
||||
var height = 50;
|
||||
var click = 0;
|
||||
|
||||
// iterate for rows
|
||||
for (var row = 0; row < 10; row++) {
|
||||
data.push( new Array() );
|
||||
|
||||
// iterate for cells/columns inside rows
|
||||
for (var column = 0; column < 12; column++) {
|
||||
data[row].push({
|
||||
x: xpos,
|
||||
y: ypos,
|
||||
width: width,
|
||||
height: height,
|
||||
text: "test",
|
||||
click: click
|
||||
})
|
||||
// increment the x position. I.e. move it over by 50 (width variable)
|
||||
xpos += width;
|
||||
}
|
||||
// reset the x position after a row is complete
|
||||
xpos = 1;
|
||||
// increment the y position for the next row. Move it down 50 (height variable)
|
||||
ypos += height;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
var gridData = gridData();
|
||||
// I like to log the data to the console for quick debugging
|
||||
console.log(gridData);
|
||||
|
||||
var grid = d3.select("#bluegrid")
|
||||
.append("svg")
|
||||
.attr("width","610px")
|
||||
.attr("height","510px");
|
||||
|
||||
var row = grid.selectAll(".row")
|
||||
.data(gridData)
|
||||
.enter().append("g")
|
||||
.attr("class", "row");
|
||||
|
||||
var column = row.selectAll(".square")
|
||||
.data(function(d) { return d; })
|
||||
.enter().append("rect")
|
||||
.attr("class","square")
|
||||
.attr("x", function(d) { return d.x; })
|
||||
.attr("y", function(d) { return d.y; })
|
||||
.attr("width", function(d) { return d.width; })
|
||||
.attr("height", function(d) { return d.height; })
|
||||
.style("fill", "#fff")
|
||||
.style("stroke", "#222")
|
||||
.on('click', function(d) {
|
||||
d.click ++;
|
||||
if ((d.click)%4 == 0 ) { d3.select(this).style("fill","#fff"); }
|
||||
if ((d.click)%4 == 1 ) { d3.select(this).style("fill","#2C93E8"); }
|
||||
if ((d.click)%4 == 2 ) { d3.select(this).style("fill","#F56C4E"); }
|
||||
if ((d.click)%4 == 3 ) { d3.select(this).style("fill","#838690"); }
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
15
visualisations/index.html
Обычный файл
15
visualisations/index.html
Обычный файл
@ -0,0 +1,15 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="https://d3js.org/d3.v4.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<H2>AMITT Red TTPs (techniques)</H2>
|
||||
<div id="bluegrid"></div>
|
||||
|
||||
<H2>AMITT Blue TTPs (counters)</H2>
|
||||
<div id="redgrid"></div>
|
||||
|
||||
<script src="grid.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
13
visualisations/index2.html
Обычный файл
13
visualisations/index2.html
Обычный файл
@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>D3 Page Template</title>
|
||||
<script type="text/javascript" src="d3.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
// Your beautiful D3 code will go here
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
14
visualisations/index_local.html
Обычный файл
14
visualisations/index_local.html
Обычный файл
@ -0,0 +1,14 @@
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript" src="d3.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<H2>AMITT Red TTPs (techniques)</H2>
|
||||
<div id="bluegrid"></div>
|
||||
|
||||
<H2>AMITT Blue TTPs (counters)</H2>
|
||||
<div id="redgrid"></div>
|
||||
|
||||
<script src="grid.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
14
visualisations/index_remote.html
Обычный файл
14
visualisations/index_remote.html
Обычный файл
@ -0,0 +1,14 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="https://d3js.org/d3.v4.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<H2>AMITT Red TTPs (techniques)</H2>
|
||||
<div id="bluegrid"></div>
|
||||
|
||||
<H2>AMITT Blue TTPs (counters)</H2>
|
||||
<div id="redgrid"></div>
|
||||
|
||||
<script src="grid.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
8
visualisations/project_1.html
Обычный файл
8
visualisations/project_1.html
Обычный файл
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="https://d3js.org/d3.v6.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
Загрузка…
x
Ссылка в новой задаче
Block a user