EUCI marking added

pull/8/head
Alexandre Dulaunoy 2015-12-01 17:11:43 +01:00
parent 1079cf86d8
commit 0a88e2d83b
1 changed files with 4 additions and 2 deletions

View File

@ -30,7 +30,7 @@ import json
import os.path
import argparse
taxonomies = ['admiralty-scale','tlp', 'circl', 'veris', 'ecsirt', 'dni-ism', 'nato']
taxonomies = ['admiralty-scale','tlp', 'circl', 'veris', 'ecsirt', 'dni-ism', 'nato', 'euci']
argParser = argparse.ArgumentParser(description='Dump Machine Tags (Triple Tags) from MISP taxonomies')
argParser.add_argument('-e', action='store_true', help='Include expanded tags')
@ -87,7 +87,7 @@ for taxonomy in taxonomies:
for predicate in t['predicates']:
if args.a:
doc = asciidoc(content=predicate['value'], adoc=doc, t='predicate')
if t['values'] is None:
if t.get('values') is None:
if args.a:
doc = asciidoc(content=machineTag(namespace=namespace, predicate=predicate['value']), adoc=doc)
doc = asciidoc(content=machineTag(namespace=namespace, predicate=predicate['expanded']), adoc=doc, t='description')
@ -95,6 +95,8 @@ for taxonomy in taxonomies:
print (machineTag(namespace=namespace, predicate=predicate['value']))
if args.e:
print ("--> " + machineTag(namespace=namespace, predicate=predicate['expanded']))
if predicate.get('description'):
print ("--> " + predicate['description'])
else:
for e in t['values']:
if e['predicate'] == predicate['value']: