Skip to content

Commit 6ddbf10

Browse files
committed
API Object initial commit
1 parent 7303519 commit 6ddbf10

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

cybox/objects/api_object.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2013, The MITRE Corporation. All rights reserved.
2+
# See LICENSE.txt for complete terms.
3+
4+
import cybox
5+
import cybox.bindings.api_object as api_binding
6+
from cybox.common import ObjectProperties, String, HexBinary, StructuredText
7+
8+
9+
class API(ObjectProperties):
10+
_binding = api_binding
11+
_binding_class = api_binding.APIObjectType
12+
_namespace = "http://cybox.mitre.org/objects#APIObject-2"
13+
_XSI_NS = "APIObj"
14+
_XSI_TYPE = "APIObjectType"
15+
16+
description = cybox.TypedField("Description", StructuredText)
17+
function_name = cybox.TypedField("Function_Name", String)
18+
normalized_function_name = cybox.TypedField("Normalized_Function_Name", String)
19+
#platform TODO: add PlatformSpecificationType
20+
address = cybox.TypedField("Address", HexBinary)

cybox/utils/nsparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def get_class_for_object_type(self, object_type):
219219
OBJ_LIST = [
220220
('AccountObjectType', 'cybox.objects.account_object.Account', 'account_object', 'http://cybox.mitre.org/objects#AccountObject-2', []),
221221
('AddressObjectType', 'cybox.objects.address_object.Address', 'address_object', 'http://cybox.mitre.org/objects#AddressObject-2', []),
222-
('APIObjectType', None, 'api_object', 'http://cybox.mitre.org/objects#APIObject-2', []),
222+
('APIObjectType', 'cybox.objects.api_object.API', 'api_object', 'http://cybox.mitre.org/objects#APIObject-2', []),
223223
('ArtifactObjectType', 'cybox.objects.artifact_object.Artifact', 'artifact_object', 'http://cybox.mitre.org/objects#ArtifactObject-2', []),
224224
('CodeObjectType', None, 'code_object', 'http://cybox.mitre.org/objects#CodeObject-2', []),
225225
('CustomObjectType', None, 'custom_object', 'http://cybox.mitre.org/objects#CustomObject-1', []),

0 commit comments

Comments
 (0)