Skip to content

Latest commit

 

History

History
26 lines (14 loc) · 1.3 KB

README.md

File metadata and controls

26 lines (14 loc) · 1.3 KB

ctfd-challenge-dependencies

Verified working with CTFd version 1.2.0

Add dependencies to CTFd challenges.

When a team loads the challenge page, only challenges with satisfied dependencies will be shown.

admin panel

Install

  1. clone this repository to your CTFd installation under CTFd/plugins/
  2. Start/restart your ctfd instance
  3. Thats it. At this point you should find a plugin menu item called "Challenge dependencies" under your admin panel. From there you can add and remove dependencies to challenges. When a team loads the challenge page, only challenges with satisfied dependencies will be shown

Developer notes

I tried to make this plugin as un-intrusive as possible. Meaning it manipulates as little as possible of pre existing routes and database structure. Hopefully this will make it easier to maintain with future CTFd versions.

The only API endpoint which is overwritten with a custom plugin function is /chals (only returns challenges which meets its dependencies).

A wrapper function is also added to some other functions to prevent access to challenges with unmet dependencies. See the load function to find out which ones.

No pre existing database tables are manipulated. But a new table dependencies is added.