From 110a54f51030a73f692a6fa48918c123ee144e14 Mon Sep 17 00:00:00 2001 From: rafliher Date: Sat, 25 Oct 2025 15:07:24 +0700 Subject: [PATCH] checker fixes --- receiver/challenges/{Blogspot.py => Blogpost.py} | 6 +++--- receiver/challenges/CDN.py | 2 +- receiver/challenges/Carbeat.py | 2 +- receiver/challenges/Phew.py | 2 +- receiver/challenges/Sheesh.py | 2 +- receiver/main.py | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) rename receiver/challenges/{Blogspot.py => Blogpost.py} (98%) diff --git a/receiver/challenges/Blogspot.py b/receiver/challenges/Blogpost.py similarity index 98% rename from receiver/challenges/Blogspot.py rename to receiver/challenges/Blogpost.py index ad478cf..0cde3b5 100644 --- a/receiver/challenges/Blogspot.py +++ b/receiver/challenges/Blogpost.py @@ -15,7 +15,7 @@ from PIL import Image # pillow for tiny PNG generation from .Challenge import Challenge -class Blogspot(Challenge): +class Blogpost(Challenge): """ SLA checker for the provided Flask challenge app. @@ -26,8 +26,8 @@ class Blogspot(Challenge): - Login flow at /login, register at /register - Create post at /create, view post at /post/, uploads at /uploads/ """ - flag_location = 'flags/blogspot.txt' # Host copy (used by your orchestrator) - history_location = 'history/blogspot.txt' + flag_location = 'flags/blogpost.txt' # Host copy (used by your orchestrator) + history_location = 'history/blogpost.txt' container_flag_path = '/flag.txt' container_name = 'blogpost_container' # <-- set to your actual container name diff --git a/receiver/challenges/CDN.py b/receiver/challenges/CDN.py index df9f8cd..d43f32f 100644 --- a/receiver/challenges/CDN.py +++ b/receiver/challenges/CDN.py @@ -26,7 +26,7 @@ class CDN(Challenge): flag_location = 'flags/cdn.txt' # host copy (written by your orchestrator) history_location = 'history/cdn.txt' container_flag_path = '/flag.txt' - container_name = 'chal_app' # adjust if your container name differs + container_name = 'cdn_container' # adjust if your container name differs # Canonical ExifTool markers (NO app fallbacks allowed) _exif_must_have = ( diff --git a/receiver/challenges/Carbeat.py b/receiver/challenges/Carbeat.py index 54023f6..4b5879e 100644 --- a/receiver/challenges/Carbeat.py +++ b/receiver/challenges/Carbeat.py @@ -10,7 +10,7 @@ class Carbeat(Challenge): history_location = 'history/carbeat.txt' _CONTAINER = "carbeat_container" - _SERVICE_CMD = ["docker", "exec", "-i", _CONTAINER, "/home/ctf/chall/mybini"] + _SERVICE_CMD = ["docker", "exec", "-i", _CONTAINER, "/home/ctfuser/chall/mybini"] _HEX_RE = re.compile(r'^[0-9a-fA-F]+$') def _read_container_flag(self) -> str: diff --git a/receiver/challenges/Phew.py b/receiver/challenges/Phew.py index 45e2889..b799c24 100644 --- a/receiver/challenges/Phew.py +++ b/receiver/challenges/Phew.py @@ -9,7 +9,7 @@ class Phew(Challenge): flag_location = 'flags/phew.txt' history_location = 'history/phew.txt' - _CONTAINER = "pailier_container" # <-- set to your container name + _CONTAINER = "phew_container" # <-- set to your container name _SERVICE_CMD = ["docker", "exec", "-i", _CONTAINER, "python3", "/usr/local/bin/chall.py"] _HEX_RE = re.compile(r'^[0-9a-fA-F]+$') diff --git a/receiver/challenges/Sheesh.py b/receiver/challenges/Sheesh.py index 3997dbc..6486705 100644 --- a/receiver/challenges/Sheesh.py +++ b/receiver/challenges/Sheesh.py @@ -10,7 +10,7 @@ class Sheesh(Challenge): history_location = 'history/sheesh.txt' _CONTAINER = "sheesh_container" - _SERVICE_CMD = ["docker", "exec", "-i", _CONTAINER, "python3", "/usr/local/bin/chall.py"] + _SERVICE_CMD = ["docker", "exec", "-i", _CONTAINER, "python3", "/home/ctf/chall/src/chall.py"] _HEX_RE = re.compile(r'^[0-9a-fA-F]+$') def _read_container_flag(self) -> str: diff --git a/receiver/main.py b/receiver/main.py index 5c32295..a06949a 100644 --- a/receiver/main.py +++ b/receiver/main.py @@ -3,7 +3,7 @@ from pydantic import BaseModel from fastapi.security import HTTPBasic, HTTPBasicCredentials from config import get_settings -from challenges.Blogspot import Blogspot +from receiver.challenges.Blogpost import Blogpost from challenges.Carbeat import Carbeat from challenges.CDN import CDN from challenges.Phew import Phew @@ -23,7 +23,7 @@ security = HTTPBasic() settings = get_settings() challenges = { - "blogpost": Blogspot(10000), + "blogpost": Blogpost(10000), "carbeat": Carbeat(11000), "cdn": CDN(12000), "phew": Phew(13000),