题目的名称取决于 配置文件里的 name
题目描述也是如此
仅支持一个附件,请压缩后填入
如果 已经有镜像 可以 不编写src内容,但请保持目录结构
| 字段 | 类型 | 是否必选 | 说明 |
|---|---|---|---|
name |
String |
✅ 必选 | 挑战名称 |
author |
String |
✅ 必选 | 挑战作者 |
category |
String |
✅ 必选 | 挑战类别 ['Web','Crypto','Pwn','Misc','Reverse'] |
description |
String |
✅ 必选 | 挑战描述 |
attachment |
Option<String> |
❌ 可选 | 附件文件路径,如源码/提示 |
| 字段 | 类型 | 是否必选 | 说明 |
|---|---|---|---|
value |
String |
✅ 必选(可为空字符串) | flag 值,若为空字符串表示动态生成 |
env_var |
String |
✅ 必选 | 运行时 flag 所在的环境变量名 |
如果使用了docker 则需要勾选
| 字段 | 类型 | 是否必选 | 说明 |
|---|---|---|---|
image_tag |
String |
✅ 必选(若定义 docker) | Docker 镜像标签,如 web_test:latest |
port |
String |
✅ 必选(若定义 docker) | 容器暴露端口及协议,如 "80/tcp" |
name = "web1"
author = "fb0sh@outlook.com"
category = "Web"
description = "this is a description for web1"
attachment = "attachment/item1.txt"
[flag]
value = "" # is empty stand for dynamic flag
env_var = "FLAG"
[docker]
image_tag = "web_test:latest"
port = "80/tcp"#[derive(Debug, Deserialize)]
pub struct ChallengeMeta {
pub name: String,
pub author: String,
pub category: String,
pub description: String,
pub flag: FlagMeta,
pub docker: Option<DockerMeta>,
pub attachment: Option<String>,
}
#[derive(Debug, Deserialize)]
pub struct FlagMeta {
pub value: String,
pub env_var: String,
}
#[derive(Debug, Deserialize)]
pub struct DockerMeta {
pub image_tag: String,
pub port: String, // e.g. "80/tcp"
}