From 67a33b67a87e262a8aa2aa5554378d8c8ca9d9d0 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Tue, 24 Nov 2015 09:17:16 +0100 Subject: [PATCH] Veris added + skipping non expanded predicates --- tools/machinetag.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/machinetag.py b/tools/machinetag.py index 28f6612..a617bd2 100755 --- a/tools/machinetag.py +++ b/tools/machinetag.py @@ -30,7 +30,7 @@ import json import os.path import argparse -taxonomies = ['admiralty-scale','tlp', 'circl'] +taxonomies = ['admiralty-scale','tlp', 'circl', 'veris'] argParser = argparse.ArgumentParser(description='Dump Machine Tags (Triple Tags) from MISP taxonomies') argParser.add_argument('-e', action='store_true', help='Including expanded tags') @@ -59,7 +59,8 @@ for taxonomy in taxonomies: else: for e in t['values']: if e['predicate'] == predicate['value']: - expanded = predicate['expanded'] + if 'expanded' in predicate: + expanded = predicate['expanded'] for v in e['entry']: print (machineTag(namespace=namespace, predicate=e['predicate'], value=v['value'])) if args.e: