attck 0.3.0

Structure representation of MITRE ATT&CK matrices
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! This example illustrates using custom properties and how to keep data
//! alive when iterating through STIX objects.

use std::collections::BTreeSet;

fn main() {
    let enterprise = attck::enterprise();

    let data_sources = enterprise
        .attack_patterns()
        .flat_map(|ap| &ap.data().mitre.data_sources)
        .collect::<BTreeSet<_>>();

    for data_source in data_sources {
        println!("{}", data_source);
    }
}