meta

package module
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 12 Imported by: 0

README

Meta

题目信息 Meta

题目环境生成器 - https://github.com/ctfhub-team/challenge_generate 环境制作说明 - https://www.wolai.com/ctfhub/3DvnJJtPbHyyDtVkDaW1yz

说明

author:
  # 制作者ID,由cg自动生成
  name: l1n3
  # 制作者邮箱,由cg自动生成
  contact: yw9381@163.com
task:
  # 题目镜像名称,由cg自动生成,题目自身名称中应当不包含_
  name: challenge_2022_hitcon_web_rce-me
  # web = 浏览器访问 | nc = nc访问 | file = 附件 | ext = 外部题目
  type: web
  # 题目分类,首字母需要大写,每个题目应当只有一个分类
  # 例如 Web, Pwn, Reverse, Misc, Crypto, Forensics, Blockchain, Android, Mobile, ICS, IoT
  category: Web
  # 题目描述
  description: aasasdsadas
  # 题目难度,由cg自动生成
  level: 签到
  # 题目flag
  # 如是静态flag在此处填写具体的flag值
  # 如是动态flag则此处为空字符串
  flag: 
  # 题目提示,如无提示则此处为空数组
  hints:
    - asdasdaz
    - asdas
    - asdad
challenge:
  # 题目显示名称
  name: rce me
  # 题目来源,来源格式: 年份-比赛名称简写-题目类型-题目显示名称
  # 例如 2021年强网杯的Web类的babysqli,则为2021-QWB-Web-baysqli
  # 例如 2019年SCTF的Pwn类的babyheap,则为2019-SCTF-Pwn-bayheap
  refer: 2022-HitCon-Web-rce
  # 题目标签,标签应当尽可能体现题目考点,如无标签则此处为空数组
  tags:
    - web
    - 2022
    - hitcon

Yaml

Single 单文件
author:
  name: 陌竹
  contact: mozhu233@outlook.com
task:
  name: skill_web_advanced_jwt_infoleakage
  type: web
  category: Web
  description: JWT的头部和有效载荷这两部分的数据是以明文形式传输的
  level: easy
  flag: ""
challenge:
  name: 敏感信息泄露
  refer: https://www.ctfhub.com
  tags:
    - web
    - jwt
Multiple 多文件合并
---
author:
  name: 陌竹
  contact: mozhu233@outlook.com
task:
  name: skill_web_advanced_jwt_infoleakage
  type: web
  category: Web
  description: JWT的头部和有效载荷这两部分的数据是以明文形式传输的
  level: easy
  flag: ""
challenge:
  name: 敏感信息泄露
  refer: https://www.ctfhub.com
  tags:
    - web
    - jwt
---
author:
  name: 陌竹
  contact: mozhu233@outlook.com
task:
  name: skill_web_ssrf_file_read
  type: web
  category: Web
  description: 尝试去读取一下Web目录下的flag.php吧
  level: easy
  flag: ""
challenge:
  name: 伪协议读取文件
  refer: https://www.ctfhub.com
  tags:
    - web
    - ssrf

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskLevel_name = map[int32]string{
		0: "Checkin",
		1: "Easy",
		2: "Medium",
		3: "Hard",
	}
	TaskLevel_value = map[string]int32{
		"Checkin": 0,
		"Easy":    1,
		"Medium":  2,
		"Hard":    3,
	}
)

Enum value maps for TaskLevel.

View Source
var (
	TaskType_name = map[int32]string{
		0: "Unknown",
		1: "Con",
		2: "File",
		3: "Ext",
	}
	TaskType_value = map[string]int32{
		"Unknown": 0,
		"Con":     1,
		"File":    2,
		"Ext":     3,
	}
)

Enum value maps for TaskType.

Functions

func Template

func Template() string

Types

type Author

type Author struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Contact string `protobuf:"bytes,2,opt,name=contact,proto3" json:"contact,omitempty"`
	// contains filtered or unexported fields
}

func (*Author) Descriptor deprecated added in v1.0.9

func (*Author) Descriptor() ([]byte, []int)

Deprecated: Use Author.ProtoReflect.Descriptor instead.

func (*Author) GetContact added in v1.0.9

func (x *Author) GetContact() string

func (*Author) GetName added in v1.0.9

func (x *Author) GetName() string

func (*Author) ProtoMessage added in v1.0.9

func (*Author) ProtoMessage()

func (*Author) ProtoReflect added in v1.0.9

func (x *Author) ProtoReflect() protoreflect.Message

func (*Author) Reset added in v1.0.9

func (x *Author) Reset()

func (*Author) String added in v1.0.9

func (x *Author) String() string

type Challenge

type Challenge struct {
	Name  string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Refer string   `protobuf:"bytes,2,opt,name=refer,proto3" json:"refer,omitempty"`
	Tags  []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

func (*Challenge) Descriptor deprecated added in v1.0.9

func (*Challenge) Descriptor() ([]byte, []int)

Deprecated: Use Challenge.ProtoReflect.Descriptor instead.

func (*Challenge) GetName added in v1.0.9

func (x *Challenge) GetName() string

func (*Challenge) GetRefer added in v1.0.9

func (x *Challenge) GetRefer() string

func (*Challenge) GetTags added in v1.0.9

func (x *Challenge) GetTags() []string

func (*Challenge) ProtoMessage added in v1.0.9

func (*Challenge) ProtoMessage()

func (*Challenge) ProtoReflect added in v1.0.9

func (x *Challenge) ProtoReflect() protoreflect.Message

func (*Challenge) Reset added in v1.0.9

func (x *Challenge) Reset()

func (*Challenge) String added in v1.0.9

func (x *Challenge) String() string

type Container added in v1.0.9

type Container struct {
	Image    string    `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
	Ports    []string  `protobuf:"bytes,2,rep,name=ports,proto3" json:"ports,omitempty"` // Image Expose 端口 eg: 80/tcp
	Resource *Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

func (*Container) Descriptor deprecated added in v1.0.9

func (*Container) Descriptor() ([]byte, []int)

Deprecated: Use Container.ProtoReflect.Descriptor instead.

func (*Container) GetImage added in v1.0.9

func (x *Container) GetImage() string

func (*Container) GetPorts added in v1.0.9

func (x *Container) GetPorts() []string

func (*Container) GetResource added in v1.0.9

func (x *Container) GetResource() *Resource

func (*Container) ProtoMessage added in v1.0.9

func (*Container) ProtoMessage()

func (*Container) ProtoReflect added in v1.0.9

func (x *Container) ProtoReflect() protoreflect.Message

func (*Container) Reset added in v1.0.9

func (x *Container) Reset()

func (*Container) String added in v1.0.9

func (x *Container) String() string

type Meta

type Meta struct {
	Author     *Author      `protobuf:"bytes,1,opt,name=author,proto3" json:"author,omitempty"`
	Task       *Task        `protobuf:"bytes,2,opt,name=task,proto3" json:"task,omitempty"`
	Challenge  *Challenge   `protobuf:"bytes,3,opt,name=challenge,proto3" json:"challenge,omitempty"`
	Skill      *Skill       `protobuf:"bytes,4,opt,name=skill,proto3" json:"skill,omitempty"`
	Containers []*Container `protobuf:"bytes,5,rep,name=containers,proto3" json:"containers,omitempty"`
	// contains filtered or unexported fields
}

func Default

func Default() *Meta

func Empty

func Empty() *Meta

func MustParseBytes added in v1.0.12

func MustParseBytes(data []byte) ([]*Meta, error)

func New

func New(name, contact string) *Meta

func NewSkill added in v1.0.7

func NewSkill(id, pid, tid string, leaf int64, image, name string, level TaskLevel) *Meta

func ParseBytes added in v1.0.8

func ParseBytes(data []byte) ([]*Meta, error)

func ParseFromFile added in v1.0.8

func ParseFromFile(fds ...multipart.File) ([]*Meta, error)

func (*Meta) Descriptor deprecated added in v1.0.9

func (*Meta) Descriptor() ([]byte, []int)

Deprecated: Use Meta.ProtoReflect.Descriptor instead.

func (*Meta) GetAuthor added in v1.0.9

func (x *Meta) GetAuthor() *Author

func (*Meta) GetChallenge added in v1.0.9

func (x *Meta) GetChallenge() *Challenge

func (*Meta) GetContainers added in v1.0.11

func (x *Meta) GetContainers() []*Container

func (*Meta) GetSkill added in v1.0.9

func (x *Meta) GetSkill() *Skill

func (*Meta) GetTask added in v1.0.9

func (x *Meta) GetTask() *Task

func (*Meta) NewSkill added in v1.0.7

func (m *Meta) NewSkill(id, pid, tid string, leaf int64, image, name string, level TaskLevel) *Meta

func (*Meta) ParseFormat added in v1.0.11

func (t *Meta) ParseFormat() *Meta

func (*Meta) ProtoMessage added in v1.0.9

func (*Meta) ProtoMessage()

func (*Meta) ProtoReflect added in v1.0.9

func (x *Meta) ProtoReflect() protoreflect.Message

func (*Meta) R added in v1.0.7

func (m *Meta) R() *Meta

func (*Meta) Reset added in v1.0.9

func (x *Meta) Reset()

func (*Meta) String added in v1.0.9

func (x *Meta) String() string

type Resource added in v1.0.9

type Resource struct {
	Cpu *resource.Quantity `protobuf:"bytes,1,opt,name=cpu,proto3" json:"cpu,omitempty"`
	Mem *resource.Quantity `protobuf:"bytes,2,opt,name=mem,proto3" json:"mem,omitempty"`
	// contains filtered or unexported fields
}

func (*Resource) Descriptor deprecated added in v1.0.9

func (*Resource) Descriptor() ([]byte, []int)

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetCpu added in v1.0.9

func (x *Resource) GetCpu() *resource.Quantity

func (*Resource) GetMem added in v1.0.9

func (x *Resource) GetMem() *resource.Quantity

func (*Resource) ProtoMessage added in v1.0.9

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect added in v1.0.9

func (x *Resource) ProtoReflect() protoreflect.Message

func (*Resource) Reset added in v1.0.9

func (x *Resource) Reset()

func (*Resource) String added in v1.0.9

func (x *Resource) String() string

type Skill

type Skill struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Pid  string `protobuf:"bytes,2,opt,name=pid,proto3" json:"pid,omitempty"`
	Tid  string `protobuf:"bytes,3,opt,name=tid,proto3" json:"tid,omitempty"`
	Leaf int64  `protobuf:"varint,4,opt,name=leaf,proto3" json:"leaf,omitempty"` // 树叶节点
	// contains filtered or unexported fields
}

func (*Skill) Descriptor deprecated added in v1.0.9

func (*Skill) Descriptor() ([]byte, []int)

Deprecated: Use Skill.ProtoReflect.Descriptor instead.

func (*Skill) GetId added in v1.0.9

func (x *Skill) GetId() string

func (*Skill) GetLeaf added in v1.0.9

func (x *Skill) GetLeaf() int64

func (*Skill) GetPid added in v1.0.9

func (x *Skill) GetPid() string

func (*Skill) GetTid added in v1.0.9

func (x *Skill) GetTid() string

func (*Skill) ProtoMessage added in v1.0.9

func (*Skill) ProtoMessage()

func (*Skill) ProtoReflect added in v1.0.9

func (x *Skill) ProtoReflect() protoreflect.Message

func (*Skill) Reset added in v1.0.9

func (x *Skill) Reset()

func (*Skill) String added in v1.0.9

func (x *Skill) String() string

type Task

type Task struct {
	Name          string    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type          string    `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	TypeCode      TaskType  `protobuf:"varint,3,opt,name=type_code,json=typeCode,proto3,enum=meta.TaskType" json:"type_code,omitempty"`
	Category      string    `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"`
	Description   string    `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	Level         string    `protobuf:"bytes,6,opt,name=level,proto3" json:"level,omitempty"`
	LevelCode     TaskLevel `protobuf:"varint,7,opt,name=level_code,json=levelCode,proto3,enum=meta.TaskLevel" json:"level_code,omitempty"`
	Flag          string    `protobuf:"bytes,8,opt,name=flag,proto3" json:"flag,omitempty"`
	AttachmentUrl string    `protobuf:"bytes,9,opt,name=attachment_url,json=attachmentUrl,proto3" json:"attachment_url,omitempty"`
	Hints         []string  `protobuf:"bytes,10,rep,name=hints,proto3" json:"hints,omitempty"`
	// contains filtered or unexported fields
}

func (*Task) Descriptor deprecated added in v1.0.9

func (*Task) Descriptor() ([]byte, []int)

Deprecated: Use Task.ProtoReflect.Descriptor instead.

func (*Task) GetAttachmentUrl added in v1.0.9

func (x *Task) GetAttachmentUrl() string

func (*Task) GetCategory added in v1.0.9

func (x *Task) GetCategory() string

func (*Task) GetDescription added in v1.0.9

func (x *Task) GetDescription() string

func (*Task) GetFlag added in v1.0.9

func (x *Task) GetFlag() string

func (*Task) GetHints added in v1.0.9

func (x *Task) GetHints() []string

func (*Task) GetLevel added in v1.0.9

func (x *Task) GetLevel() string

func (*Task) GetLevelCode added in v1.0.9

func (x *Task) GetLevelCode() TaskLevel

func (*Task) GetName added in v1.0.9

func (x *Task) GetName() string

func (*Task) GetType added in v1.0.9

func (x *Task) GetType() string

func (*Task) GetTypeCode added in v1.0.9

func (x *Task) GetTypeCode() TaskType

func (*Task) ParseFormat added in v1.0.11

func (t *Task) ParseFormat() *Task

func (*Task) ProtoMessage added in v1.0.9

func (*Task) ProtoMessage()

func (*Task) ProtoReflect added in v1.0.9

func (x *Task) ProtoReflect() protoreflect.Message

func (*Task) Reset added in v1.0.9

func (x *Task) Reset()

func (*Task) String added in v1.0.9

func (x *Task) String() string

type TaskLevel added in v1.0.7

type TaskLevel int32
const (
	TaskLevel_Checkin TaskLevel = 0 // 签到-入门
	TaskLevel_Easy    TaskLevel = 1 // 简单-初级
	TaskLevel_Medium  TaskLevel = 2 // 中等-中级
	TaskLevel_Hard    TaskLevel = 3 // 困难-高级
)

func (TaskLevel) Descriptor added in v1.0.9

func (TaskLevel) Descriptor() protoreflect.EnumDescriptor

func (TaskLevel) Enum added in v1.0.9

func (x TaskLevel) Enum() *TaskLevel

func (TaskLevel) EnumDescriptor deprecated added in v1.0.9

func (TaskLevel) EnumDescriptor() ([]byte, []int)

Deprecated: Use TaskLevel.Descriptor instead.

func (TaskLevel) Number added in v1.0.9

func (x TaskLevel) Number() protoreflect.EnumNumber

func (TaskLevel) String added in v1.0.9

func (x TaskLevel) String() string

func (TaskLevel) Type added in v1.0.9

type TaskType added in v1.0.7

type TaskType int32
const (
	TaskType_Unknown TaskType = 0
	TaskType_Con     TaskType = 1 // 容器
	TaskType_File    TaskType = 2 // 附件
	TaskType_Ext     TaskType = 3 // 外部
)

func (TaskType) Descriptor added in v1.0.9

func (TaskType) Descriptor() protoreflect.EnumDescriptor

func (TaskType) Enum added in v1.0.9

func (x TaskType) Enum() *TaskType

func (TaskType) EnumDescriptor deprecated added in v1.0.9

func (TaskType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TaskType.Descriptor instead.

func (TaskType) Number added in v1.0.9

func (x TaskType) Number() protoreflect.EnumNumber

func (TaskType) String added in v1.0.9

func (x TaskType) String() string

func (TaskType) Type added in v1.0.9

Jump to

Keyboard shortcuts

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