This repository was archived by the owner on Apr 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
This repository was archived by the owner on Apr 3, 2025. It is now read-only.
Challenges #3
Copy link
Copy link
Open
Description
Description
These endpoints handle everything to do with challenges.
Endpoints
- GET
/chall/all: Retrieves and responds with all challenges data. Adds entry ofsolved: booleanto the retrieved data according to the sessionId/participantId/teamId. - GET
/chall/[id]: Retrieves and responds with challenge data having the specified id. Adds entry ofsolved: booleanto the retrieved data according to the sessionId/participantId/teamId. - POST
/chall/solve: Accepts flag text and challenge id, resolves if the challenge was solved and awards points to participant & team, Responds with success/failure. It will also decrease challenge's points using the dynamic points formula. (Points are awarded using the sessionId) - POST
/chall/hint: Responds with a hint and deductsXpoints from that participant & team. (Use sessionId to determine team & participant)
Objects/Entities
interface Challenge {
id: string; // UUID
title: string;
category: string;
description: string;
hint: string;
attachments: {
url: string;
type: string;
}[];
flag: string; // Not plain text, encrypt this
points: number;
solvedByEntities: string[]; // contains ids of participants/teams that have solved this challenge
}Note
Make sure participants are not able to re-enter a flag to get points again.
Make sure that no sensitive data (such as flag, hint or solvedByEntities) is sent to the wrong endpoints.
Metadata
Metadata
Assignees
Labels
No labels