2017-05-03 23:35:33 +02:00
|
|
|
"""STIX 2.0 Cyber Observable Objects"""
|
|
|
|
|
|
|
|
from .base import Observable
|
|
|
|
# from .properties import (BinaryProperty, BooleanProperty, DictionaryProperty,
|
|
|
|
# HashesProperty, HexProperty, IDProperty,
|
|
|
|
# IntegerProperty, ListProperty, ReferenceProperty,
|
|
|
|
# StringProperty, TimestampProperty, TypeProperty)
|
2017-05-05 18:32:02 +02:00
|
|
|
from .properties import BinaryProperty, HashesProperty, IntegerProperty, ObjectReferenceProperty, StringProperty, TypeProperty
|
2017-05-03 23:35:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
class Artifact(Observable):
|
|
|
|
_type = 'artifact'
|
|
|
|
_properties = {
|
|
|
|
'type': TypeProperty(_type),
|
|
|
|
'mime_type': StringProperty(),
|
|
|
|
'payload_bin': BinaryProperty(),
|
|
|
|
'url': StringProperty(),
|
|
|
|
'hashes': HashesProperty(),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-05-04 00:19:30 +02:00
|
|
|
class AutonomousSystem(Observable):
|
|
|
|
_type = 'autonomous-system'
|
|
|
|
_properties = {
|
|
|
|
'type': TypeProperty(_type),
|
|
|
|
'number': IntegerProperty(),
|
|
|
|
'name': StringProperty(),
|
|
|
|
'rir': StringProperty(),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-05-05 18:32:02 +02:00
|
|
|
class EmailAddress(Observable):
|
|
|
|
_type = 'email-address'
|
|
|
|
_properties = {
|
|
|
|
'type': TypeProperty(_type),
|
|
|
|
'value': StringProperty(required=True),
|
|
|
|
'display_name': StringProperty(),
|
|
|
|
'belongs_to_ref': ObjectReferenceProperty(),
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-05-03 23:35:33 +02:00
|
|
|
class File(Observable):
|
|
|
|
_type = 'file'
|
|
|
|
_properties = {
|
|
|
|
'type': TypeProperty(_type),
|
|
|
|
}
|