diff --git a/css/main.css b/css/main.css index cced4bf..13f4db1 100644 --- a/css/main.css +++ b/css/main.css @@ -127,7 +127,7 @@ select.form-novelty { .four-five { grid-area: four-five; background-color: #fec6c6; } .five-five { grid-area: five-five; background-color: #fec6c6; } -.b-example-divider { +.vertical-divider { flex-shrink: 0; width: 1.5rem; min-height: 100vh; @@ -137,6 +137,16 @@ select.form-novelty { box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15); } +.horizontal-divider { + flex-shrink: 0; + width: 100%; + height: 1.5rem; + background-color: rgba(0, 0, 0, .1); + border: solid rgba(0, 0, 0, .15); + border-width: 1px 0; + box-shadow: inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15); +} + .bi { vertical-align: -.125em; pointer-events: none; diff --git a/index.html b/index.html index 055c35e..36f8e38 100644 --- a/index.html +++ b/index.html @@ -105,7 +105,7 @@ -
+
@@ -318,6 +318,19 @@

+ +
+
+

APT1

+

Test

+
+
+
+

APT2

+

Test

+
+
+

diff --git a/test.py b/test.py new file mode 100644 index 0000000..ca82668 --- /dev/null +++ b/test.py @@ -0,0 +1,31 @@ +import json + +from stix2 import FileSystemSource, Filter +from stix2.utils import get_type_from_id + +# create FileSystemSource +fs_source = FileSystemSource("../cti/enterprise-attack") + + +rels = fs_source.query(Filter("type", "=", "relationship")) + +isets = fs_source.query(Filter("type", "=", "intrusion-set")) +groups = [] +for iset in isets: + z = dict(iset).copy() + z["attack-patterns"] = [] + + for rel in rels: + if ( + get_type_from_id(rel.source_ref) == "intrusion-set" + and get_type_from_id(rel.target_ref) == "attack-pattern" + and iset.id == rel.source_ref + ): + z["attack-patterns"].append(dict(rel)) + + groups.append(z) + +# TODO: techniques! + +print(len(groups)) +print(json.dumps(groups[0], indent=2, default=str))