Skip to content

Commit 9ecb2fa

Browse files
committed
updated notebook to download STIX data
1 parent d3f95ad commit 9ecb2fa

1 file changed

Lines changed: 90 additions & 26 deletions

File tree

docs/playground/0-Download-ATTACK-STIX-Data.ipynb

Lines changed: 90 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
{
1818
"cell_type": "code",
19-
"execution_count": null,
19+
"execution_count": 1,
2020
"metadata": {},
2121
"outputs": [],
2222
"source": [
@@ -32,7 +32,7 @@
3232
},
3333
{
3434
"cell_type": "code",
35-
"execution_count": null,
35+
"execution_count": 2,
3636
"metadata": {},
3737
"outputs": [],
3838
"source": [
@@ -48,9 +48,17 @@
4848
},
4949
{
5050
"cell_type": "code",
51-
"execution_count": null,
51+
"execution_count": 3,
5252
"metadata": {},
53-
"outputs": [],
53+
"outputs": [
54+
{
55+
"name": "stdout",
56+
"output_type": "stream",
57+
"text": [
58+
"Downloaded enterprise-attack.json to downloads/v15.1\n"
59+
]
60+
}
61+
],
5462
"source": [
5563
"stix20_downloader.download_attack_data(domain=\"enterprise\", release=\"15.1\")"
5664
]
@@ -64,7 +72,7 @@
6472
},
6573
{
6674
"cell_type": "code",
67-
"execution_count": null,
75+
"execution_count": 4,
6876
"metadata": {},
6977
"outputs": [],
7078
"source": [
@@ -80,27 +88,57 @@
8088
},
8189
{
8290
"cell_type": "code",
83-
"execution_count": null,
91+
"execution_count": 5,
8492
"metadata": {},
85-
"outputs": [],
93+
"outputs": [
94+
{
95+
"name": "stdout",
96+
"output_type": "stream",
97+
"text": [
98+
"Downloaded mobile-attack.json to downloads/v15.1\n"
99+
]
100+
}
101+
],
86102
"source": [
87103
"stix21_downloader.download_attack_data(domain=\"mobile\", release=\"15.1\")"
88104
]
89105
},
90106
{
91107
"cell_type": "code",
92-
"execution_count": null,
108+
"execution_count": 6,
93109
"metadata": {},
94-
"outputs": [],
110+
"outputs": [
111+
{
112+
"data": {
113+
"text/plain": [
114+
"'downloads/v15.1/mobile-attack.json'"
115+
]
116+
},
117+
"execution_count": 6,
118+
"metadata": {},
119+
"output_type": "execute_result"
120+
}
121+
],
95122
"source": [
96123
"stix21_downloader.downloaded_file_path"
97124
]
98125
},
99126
{
100127
"cell_type": "code",
101-
"execution_count": null,
128+
"execution_count": 7,
102129
"metadata": {},
103-
"outputs": [],
130+
"outputs": [
131+
{
132+
"data": {
133+
"text/plain": [
134+
"{'mobile': 'downloads/v15.1/mobile-attack.json'}"
135+
]
136+
},
137+
"execution_count": 7,
138+
"metadata": {},
139+
"output_type": "execute_result"
140+
}
141+
],
104142
"source": [
105143
"stix21_downloader.downloaded_file_paths"
106144
]
@@ -114,7 +152,7 @@
114152
},
115153
{
116154
"cell_type": "code",
117-
"execution_count": null,
155+
"execution_count": 8,
118156
"metadata": {},
119157
"outputs": [],
120158
"source": [
@@ -123,7 +161,7 @@
123161
},
124162
{
125163
"cell_type": "code",
126-
"execution_count": null,
164+
"execution_count": 9,
127165
"metadata": {},
128166
"outputs": [],
129167
"source": [
@@ -132,7 +170,7 @@
132170
},
133171
{
134172
"cell_type": "code",
135-
"execution_count": null,
173+
"execution_count": 10,
136174
"metadata": {},
137175
"outputs": [],
138176
"source": [
@@ -145,9 +183,20 @@
145183
},
146184
{
147185
"cell_type": "code",
148-
"execution_count": null,
186+
"execution_count": 11,
149187
"metadata": {},
150-
"outputs": [],
188+
"outputs": [
189+
{
190+
"data": {
191+
"text/plain": [
192+
"187"
193+
]
194+
},
195+
"execution_count": 11,
196+
"metadata": {},
197+
"output_type": "execute_result"
198+
}
199+
],
151200
"source": [
152201
"len(techniques)"
153202
]
@@ -161,7 +210,7 @@
161210
},
162211
{
163212
"cell_type": "code",
164-
"execution_count": null,
213+
"execution_count": 12,
165214
"metadata": {},
166215
"outputs": [],
167216
"source": [
@@ -170,19 +219,34 @@
170219
},
171220
{
172221
"cell_type": "code",
173-
"execution_count": null,
222+
"execution_count": 13,
174223
"metadata": {},
175-
"outputs": [],
224+
"outputs": [
225+
{
226+
"name": "stdout",
227+
"output_type": "stream",
228+
"text": [
229+
"Downloaded enterprise-attack.json to downloads/v15.1\n",
230+
"Downloaded mobile-attack.json to downloads/v15.1\n",
231+
"Downloaded ics-attack.json to downloads/v15.1\n"
232+
]
233+
},
234+
{
235+
"data": {
236+
"text/plain": [
237+
"{'enterprise': 'downloads/v15.1/enterprise-attack.json',\n",
238+
" 'mobile': 'downloads/v15.1/mobile-attack.json',\n",
239+
" 'ics': 'downloads/v15.1/ics-attack.json'}"
240+
]
241+
},
242+
"execution_count": 13,
243+
"metadata": {},
244+
"output_type": "execute_result"
245+
}
246+
],
176247
"source": [
177248
"stix20_downloader.download_all_domains(release=\"15.1\")"
178249
]
179-
},
180-
{
181-
"cell_type": "code",
182-
"execution_count": null,
183-
"metadata": {},
184-
"outputs": [],
185-
"source": []
186250
}
187251
],
188252
"metadata": {

0 commit comments

Comments
 (0)