Files
hipctf/types.ts
m0rph3us1987 1c756af238 initial commit
2026-01-07 13:27:11 +01:00

54 lines
1023 B
TypeScript

export type Difficulty = 'Low' | 'Medium' | 'High';
export interface ChallengeFile {
name: string;
url: string;
}
export interface Challenge {
id: string;
title: string;
category: string;
difficulty: Difficulty;
description: string;
initialPoints: number;
flag: string;
files: ChallengeFile[];
solves: string[]; // Team IDs
port?: number;
connectionType?: 'nc' | 'http';
}
export interface Team {
id: string;
name: string;
password?: string;
isAdmin?: boolean | number;
isDisabled?: boolean | number;
}
export interface Solve {
teamId: string;
challengeId: string;
timestamp: number;
pointsEarned: number; // Stored at time of solve, but usually recalculated dynamically
}
export interface BlogPost {
id: string;
title: string;
content: string;
timestamp: number;
}
export interface CTFState {
isStarted: boolean;
startTime: number | null;
teams: Team[];
challenges: Challenge[];
solves: Solve[];
blogs: BlogPost[];
config: Record<string, string>;
}