Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Commit 7824a8e

Browse files
author
clittle
committed
Switch download source
1 parent 544c9e0 commit 7824a8e

9,109 files changed

Lines changed: 8 additions & 508681 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

layers/exporters/matrix_gen.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
2-
from stix2 import TAXIICollectionSource, Filter, FileSystemSource
2+
import requests
3+
from stix2 import TAXIICollectionSource, Filter, MemoryStore
34
from taxii2client import Server, Collection
45

56
class MatrixEntry:
@@ -72,9 +73,12 @@ def __init__(self, fresh=True):
7273
self.collections[collection.title.split(' ')[0].lower()] = TAXIICollectionSource(tc)
7374
else:
7475
self.collections = dict()
75-
path = os.path.sep.join(__file__.split(os.path.sep)[:-1])
76-
self.collections['enterprise'] = FileSystemSource(os.path.sep.join([path, 'raw_stix', 'enterprise-attack']))
77-
self.collections['mobile'] = FileSystemSource(os.path.sep.join([path, 'raw_stix', 'mobile-attack']))
76+
stix_e = requests.get("https://raw.githubusercontent.com/mitre/cti/subtechniques/enterprise-attack"
77+
"/enterprise-attack.json", verify=True).json()
78+
stix_m = requests.get("https://raw.githubusercontent.com/mitre/cti/subtechniques/mobile-attack/mobile"
79+
"-attack.json", verify=True).json()
80+
self.collections['enterprise'] = MemoryStore(stix_data=stix_e["objects"])
81+
self.collections['mobile'] = MemoryStore(stix_data=stix_m["objects"])
7882

7983
def _get_tactic_listing(self, mode='enterprise'):
8084
"""

layers/exporters/raw_stix/enterprise-attack/README.md

Lines changed: 0 additions & 132 deletions
This file was deleted.

layers/exporters/raw_stix/enterprise-attack/attack-pattern/attack-pattern--0042a9f5-f053-4769-b3ef-9ad018dfa298.json

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)