openc2lib

OpenC2 library

openc2lib provides an opensource implementation of the OpenC2 language and support for integration of encoding formats and protocol syntax.

All language elements are named according to the standard, with minor variations to account for reserved keywords and characters.

All the target and data types defined by the standard are available for creating OpenC2 commands.

The following base structures are also available for extending the language (see Sec. 3.1.1 of the Language Specification):

  • Enumerated
  • EnumeratedID
  • Array
  • ArrayOf
  • Map
  • MapOf
 1"""OpenC2 library
 2
 3openc2lib provides an opensource implementation of the OpenC2 language and support for 
 4integration of encoding formats and protocol syntax.
 5
 6All language elements are named according to the standard, with minor variations to
 7account for reserved keywords and characters.
 8
 9All the target and data types defined by the standard are available for creating OpenC2 
10commands.
11
12The following base structures are also available for extending the language (see Sec. 3.1.1 of 
13the Language Specification):
14- `Enumerated`
15- `EnumeratedID`
16- `Array`
17- `ArrayOf`
18- `Map`
19- `MapOf`
20
21"""
22
23from openc2lib.types.basetypes import Record, Choice, Enumerated, Array, ArrayOf, Map, MapOf
24from openc2lib.types.datatypes import L4Protocol, DateTime, Duration, TargetEnum, Nsid, ActionTargets, ActionArguments, Version, ResponseType
25from openc2lib.types.targettypes import IPv4Net, IPv4Connection, Features
26
27from openc2lib.core.actions import Actions
28from openc2lib.core.producer import Producer
29from openc2lib.core.consumer import Consumer
30from openc2lib.core.message import Command, Message, MessageType, Content, Response
31from openc2lib.core.response import StatusCode, StatusCodeDescription, Results, ExtendedResults
32from openc2lib.core.args import Args, ExtendedArguments
33from openc2lib.core.encoder import Encoder, Encoders, register_encoder
34from openc2lib.core.transfer import Transfer
35from openc2lib.core.profile import Profile, Profiles
36from openc2lib.core.target import Targets
37from openc2lib.core.register import Register