Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 28e8f12

Browse files
committed
Updated for coherency w/ python-cybox vocabulary updates
1 parent e3f17d8 commit 28e8f12

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

docs/examples.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,9 @@ needed.
197197
from maec.bundle import Bundle
198198
from maec.bundle import MalwareAction
199199
from maec.utils import IDGenerator, set_id_method
200-
from cybox.core import Object, AssociatedObjects, AssociatedObject, AssociationType
200+
from cybox.core import Object, AssociatedObjects, AssociatedObject
201201
from cybox.objects.file_object import File
202+
from cybox.common import VocabString
202203

203204
set_id_method(IDGenerator.METHOD_INT)
204205
b = Bundle()
@@ -208,11 +209,12 @@ needed.
208209
ao.properties = File()
209210
ao.properties.file_name = "badware.exe"
210211
ao.properties.size_in_bytes = "123456"
211-
ao.association_type = AssociationType()
212+
ao.association_type = VocabString()
212213
ao.association_type.value = 'output'
213214
ao.association_type.xsi_type = 'maecVocabs:ActionObjectAssociationTypeVocab-1.0'
214215

215-
a.name = 'create file'
216+
a.name = VocabString()
217+
a.name.value = 'create file'
216218
a.name.xsi_type = 'maecVocabs:FileActionNameVocab-1.0'
217219
a.associated_objects = AssociatedObjects()
218220
a.associated_objects.append(ao)

0 commit comments

Comments
 (0)