From a4fd3b957a7b2e9ceaa09c3f4fc8aa560a7f4b3b Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Wed, 25 Feb 2015 09:50:00 +0100 Subject: [PATCH] Use property class name in object ID --- app/files/scripts/misp2cybox.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/files/scripts/misp2cybox.py b/app/files/scripts/misp2cybox.py index df3f5069b..046bd5aa5 100644 --- a/app/files/scripts/misp2cybox.py +++ b/app/files/scripts/misp2cybox.py @@ -40,8 +40,9 @@ def generateObservable(indicator, attribute): if (attribute["type"] in simple_type_to_method.keys()): action = getattr(this_module, simple_type_to_method[attribute["type"]], None) if (action != None): - object = Object(action(attribute)) - object.id_ = cybox.utils.idgen.__generator.namespace.prefix + ":" + attribute["type"] + "-" + attribute["uuid"] + property = action(attribute) + object = Object(property) + object.id_ = cybox.utils.idgen.__generator.namespace.prefix + ":" + property.__class__.__name__ + "-" + attribute["uuid"] observable = Observable(object) observable.id_ = cybox.utils.idgen.__generator.namespace.prefix + ":observable-" + attribute["uuid"] indicator.add_observable(observable)