Skip to content

Commit

Permalink
API Object initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ikiril01 committed Sep 12, 2013
1 parent 7303519 commit 6ddbf10
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions cybox/objects/api_object.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2013, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.

import cybox
import cybox.bindings.api_object as api_binding
from cybox.common import ObjectProperties, String, HexBinary, StructuredText


class API(ObjectProperties):
_binding = api_binding
_binding_class = api_binding.APIObjectType
_namespace = "http://cybox.mitre.org/objects#APIObject-2"
_XSI_NS = "APIObj"
_XSI_TYPE = "APIObjectType"

description = cybox.TypedField("Description", StructuredText)
function_name = cybox.TypedField("Function_Name", String)
normalized_function_name = cybox.TypedField("Normalized_Function_Name", String)
#platform TODO: add PlatformSpecificationType
address = cybox.TypedField("Address", HexBinary)
2 changes: 1 addition & 1 deletion cybox/utils/nsparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def get_class_for_object_type(self, object_type):
OBJ_LIST = [
('AccountObjectType', 'cybox.objects.account_object.Account', 'account_object', 'http://cybox.mitre.org/objects#AccountObject-2', []),
('AddressObjectType', 'cybox.objects.address_object.Address', 'address_object', 'http://cybox.mitre.org/objects#AddressObject-2', []),
('APIObjectType', None, 'api_object', 'http://cybox.mitre.org/objects#APIObject-2', []),
('APIObjectType', 'cybox.objects.api_object.API', 'api_object', 'http://cybox.mitre.org/objects#APIObject-2', []),
('ArtifactObjectType', 'cybox.objects.artifact_object.Artifact', 'artifact_object', 'http://cybox.mitre.org/objects#ArtifactObject-2', []),
('CodeObjectType', None, 'code_object', 'http://cybox.mitre.org/objects#CodeObject-2', []),
('CustomObjectType', None, 'custom_object', 'http://cybox.mitre.org/objects#CustomObject-1', []),
Expand Down

0 comments on commit 6ddbf10

Please sign in to comment.