otupy.types.data.uri.URI

class URI(uri)

Bases: object

OpenC2 URI

Implements the uri target (Section 3.4.1.17). A uniform resource identifier (URI) - RFC 3986.

Note that the standard define the URI type as part of targets, but it is also used in the Payload, which is a data type. This breaks the assumption of otupy that target`s uses `data and not vice-versa. Therefore, a data.URI type is defined, which is used to create the target. Users must be aware to distinguish between the two types, namely using target.URI as a Target, and data.URI as a data type.

otupy only binds URI to target.URI. If you need to use data.URI to build a payload, call it as types.data.URI.

Methods

get

Returns the uri as string

set

Value must be an Uniform Resource Identifier (URI) as defined in [RFC3986]

__init__(uri)
get()

Returns the uri as string

set(uri)

Value must be an Uniform Resource Identifier (URI) as defined in [RFC3986]