parseutils

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arg

type Arg struct {
	Name        string `yaml:"name"`
	Description string `yaml:"description,omitempty"`
	Type        string `yaml:"type,omitempty"`
	Choices     []any  `yaml:"choices,omitempty"`
	Default     any    `yaml:"default,omitempty"`
}

Arg is a struct that represents the information of an argument in a TTP in a YAML file.

type Mitre

type Mitre struct {
	Tactics       []string `yaml:"tactics,omitempty"`
	Techniques    []string `yaml:"techniques,omitempty"`
	Subtechniques []string `yaml:"subtechniques,omitempty"`
}

Mitre is a struct that represents a MITRE tactic, technique, or subtechnique in a YAML file.

type Platform

type Platform struct {
	OS string `yaml:"os"`
}

Platform is a struct that represents a platform in a YAML file like Windows, Linux, etc.

type Requirements

type Requirements struct {
	Platforms []Platform `yaml:"platforms,omitempty"`
	Superuser bool       `yaml:"superuser,omitempty"`
}

Requirements is a struct that represents the requirements of a TTP in a YAML file like Platform (OS), superuser, etc.

type TTP

type TTP struct {
	APIVersion   string       `yaml:"api_version"`
	UUID         string       `yaml:"uuid"`
	Name         string       `yaml:"name"`
	Description  string       `yaml:"description"`
	Requirements Requirements `yaml:"requirements,omitempty"`
	Mitre        Mitre        `yaml:"mitre,omitempty"`
	Args         []Arg        `yaml:"args,omitempty"`
}

TTP is a struct that represents a TTP in a YAML file.

func ParseTTP

func ParseTTP(data []byte, filename string) (TTP, error)

ParseTTP parses a YAML file and returns a map of the contents.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL