Forcing use of offline mitre enrichment data... FOR SPEEEEEED

This commit is contained in:
pyth0n1c
2022-04-07 13:15:54 -07:00
parent 372d9f60c7
commit d6cfeecc50
@@ -18,6 +18,7 @@ class AttackEnrichment():
file_path = os.path.join(os.path.dirname(__file__), '../../../../lookups/mitre_enrichment.csv')
try:
raise(Exception("INTENTIONAL EXCEPTION TO FORCE USE OF OFFLINE MITRE ATTACK ENRICHMENT"))
lift = attack_client()
all_enterprise = lift.get_enterprise(stix_format=False)
enterprise_relationships = lift.get_enterprise_relationships()
@@ -67,4 +68,4 @@ class AttackEnrichment():
attack_lookup = {rows[0]:{'technique': rows[1], 'tactics': rows[2].split('|'), 'groups': rows[3].split('|')} for rows in reader}
attack_lookup.pop('mitre_id')
return attack_lookup
return attack_lookup