Custom oracle plugin, originally by @nbanmp, customization by @Lukas-Dresel, porting to CTFd (commit 4793d95338935686ef005c24ebb6606e1be7403b
) by @degrigis.
When creating a challenge, an endpoint for an "oracle" is specified. This oracle handles challenge deployment and testing. It must respond to a post request to /create
and /attempt
.
Clone into CTFd plugins directory.
JSON will be provided with the integer team_id
and boolean force_new
.
The endpoint must ensure a challenge instance for the specified team exists, and return a string with details containing any information needed to interact with the deployed instance.
If force_new
is true, the endpoint must create a new instance and may delete the old instance. If force_new
is false, the endpoint should create a new instance only if no instance has been created, and should otherwise return the already existing instance.
JSON will be provided with the integer team_id
.
The endpoint must validate whether or not the team's challenge instance has reached a solved state. If the instance has been solved, a 200 code should be returned, if the instance has not been solved, a non-200 code should be returned.