Add condition attributes

pull/570/head
Richard van den Berg 2015-07-15 17:10:55 +02:00
parent a0ce8bf1e6
commit c15a178013
1 changed files with 2 additions and 1 deletions

View File

@ -41,6 +41,7 @@ def generateObservable(indicator, attribute):
action = getattr(this_module, simple_type_to_method[attribute["type"]], None)
if (action != None):
property = action(attribute)
property.condition = "Equals"
object = Object(property)
object.id_ = cybox.utils.idgen.__generator.namespace.prefix + ":" + property.__class__.__name__ + "-" + attribute["uuid"]
observable = Observable(object)
@ -71,7 +72,7 @@ def generateFileObservable(filenameValue, hashValue):
else:
file_object.file_name = filenameValue
if (hashValue != ""):
file_object.add_hash(Hash(hashValue))
file_object.add_hash(Hash(hash_value=hashValue, exact=True))
return file_object
def generateIPObservable(attribute):