From ba59d5e6ca9cce257add54f82ab2da865f3b55f1 Mon Sep 17 00:00:00 2001 From: 13m0n4de <136407746+13m0n4de@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:29:17 +0800 Subject: [PATCH] =?UTF-8?q?feat(misc/neko-quiz):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=A2=98=E7=9B=AE=E3=80=8C=E7=8C=AB=E5=92=AA=E9=97=AE=E7=AD=94?= =?UTF-8?q?=E3=80=8D=20(#19)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(misc/neko-quiz): 添加 README 和构建文件 * ci(misc/neko-quiz): 添加工作流文件 * feat(misc/neko-quiz): 添加新问题 * feat(misc/neko-quiz): 添加新问题 * refactor(misc/neko-quiz): 修改配置文件 * docs(misc/neko-quiz): 更新 README 格式 * feat(misc/neko-quiz): 添加题目信息 * ci(misc/neko-quiz): 添加触发分支 * refactor(misc/neko-quiz): 更新题目介绍 --- .github/workflows/misc.neko_quiz.yml | 50 +++++++++++++++++++++ challenges/misc/neko_quiz/README.md | 21 +++++++++ challenges/misc/neko_quiz/build/Dockerfile | 3 ++ challenges/misc/neko_quiz/build/config.toml | 36 +++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 .github/workflows/misc.neko_quiz.yml create mode 100644 challenges/misc/neko_quiz/README.md create mode 100644 challenges/misc/neko_quiz/build/Dockerfile create mode 100644 challenges/misc/neko_quiz/build/config.toml diff --git a/.github/workflows/misc.neko_quiz.yml b/.github/workflows/misc.neko_quiz.yml new file mode 100644 index 0000000..8efd3f8 --- /dev/null +++ b/.github/workflows/misc.neko_quiz.yml @@ -0,0 +1,50 @@ +name: Challenge NekoQuiz + +on: + push: + branches: ["main", "misc/neko-quiz"] + paths: + - "!**/README.md" + - "challenges/misc/neko_quiz/build/**" + workflow_dispatch: + +env: + TYPE: misc + NAME: neko_quiz + REGISTRY: ghcr.io + +jobs: + challenge-build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.NAME }} + tags: | + latest + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: challenges/${{ env.TYPE }}/${{ env.NAME }}/build + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + push: true diff --git a/challenges/misc/neko_quiz/README.md b/challenges/misc/neko_quiz/README.md new file mode 100644 index 0000000..39a11e4 --- /dev/null +++ b/challenges/misc/neko_quiz/README.md @@ -0,0 +1,21 @@ +--- +title: 猫咪问答 +author: 13m0n4de +difficulty: Baby/Trivial/Easy/Normal/Medium/Hard/Expert/Insane +category: Misc +image: +port: 3000 +writeup_author: +tags: +reference: +--- + +# 猫咪问答 + +## 题目描述 + + + +## 题目解析 + + diff --git a/challenges/misc/neko_quiz/build/Dockerfile b/challenges/misc/neko_quiz/build/Dockerfile new file mode 100644 index 0000000..d155002 --- /dev/null +++ b/challenges/misc/neko_quiz/build/Dockerfile @@ -0,0 +1,3 @@ +FROM ghcr.io/13m0n4de/neko-quiz:latest + +COPY config.toml config.toml diff --git a/challenges/misc/neko_quiz/build/config.toml b/challenges/misc/neko_quiz/build/config.toml new file mode 100644 index 0000000..34d3f5f --- /dev/null +++ b/challenges/misc/neko_quiz/build/config.toml @@ -0,0 +1,36 @@ +[general] +title = "猫咪问答" +return_score = true + +[[questions]] +text = "在 SVUCTF 2023 年冬季赛中,全场一共提交多少次 Flag?其中多少次错误提交?" +points = 25 +hint = "格式:提交次数_错误次数,使用下划线分隔。如:132_39" +answers = ["78_41"] + +[[questions]] +text = "我校一号门旁的体育中心曾有一家「华莱士」,后来中间的「莱」字因为种种原因去掉了,成了「华 士」,再后来它就关门了。你能找出在炸鸡店之前那里开的是什么店吗?" +points = 25 +hint = "填写店铺全名" +answers = ["旺厨美食园"] + +[[questions]] +text = "Python 3.13.0 的最后一个 Alpha 版本发布于什么日期?" +points = 25 +hint = "格式:YYYY-MM-DD ,如 1900-01-01" +answers = ["2024-04-09"] + +[[questions]] +text = "几个月前 RFC 提出了一种利用大语言模型实现的超光速传输网络协议。然而,这种协议可能面临一种特殊攻击:预测未来的数据包,并提前将其发送到目的地。这种新型攻击手段的名称是什么?" +points = 25 +hint = "全小写英文字母" +answers = ["futureplay"] + +[flag] +env = "GZCTF_FLAG" +file = "/flag" +static_str = "flag{neko_quiz_static_flag}" + +[message] +incorrect = "没有全部答对,不能给你 FLAG 哦。" +correct = "🎉🎉🎉 $FLAG 🎉🎉🎉"