import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * CTFd is built around the Challenge resource, which contains all the attributes to define a part of the Capture The Flag event. * * This implementation has support of a more dynamic behavior for its scoring through time/solves thus is different from a standard challenge. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as ctfd from "@ctfer-io/pulumi-ctfd"; * import * as fs from "fs"; * * const http = new ctfd.ChallengeDynamic("http", { * category: "misc", * description: "...", * value: 500, * decay: 100, * minimum: 50, * state: "visible", * "function": "logarithmic", * topics: ["Misc"], * tags: [ * "misc", * "basic", * ], * }); * const httpFlag = new ctfd.Flag("httpFlag", { * challengeId: http.id, * content: "CTF{some_flag}", * }); * const httpHint1 = new ctfd.Hint("httpHint1", { * challengeId: http.id, * content: "Some super-helpful hint", * cost: 50, * }); * const httpHint2 = new ctfd.Hint("httpHint2", { * challengeId: http.id, * content: "Even more helpful hint !", * cost: 50, * requirements: [httpHint1.id], * }); * const httpFile = new ctfd.File("httpFile", { * challengeId: http.id, * contentb64: fs.readFileSync(".../image.png", { encoding: "base64" }), * }); * ``` */ export declare class ChallengeDynamic extends pulumi.CustomResource { /** * Get an existing ChallengeDynamic resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ChallengeDynamicState, opts?: pulumi.CustomResourceOptions): ChallengeDynamic; /** * Returns true if the given object is an instance of ChallengeDynamic. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ChallengeDynamic; /** * Attribution to the creator(s) of the challenge. */ readonly attribution: pulumi.Output; /** * Category of the challenge that CTFd groups by on the web UI. */ readonly category: pulumi.Output; /** * Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests. */ readonly connectionInfo: pulumi.Output; /** * The decay defines from each number of solves does the decay function triggers until reaching minimum. This function is defined by CTFd and could be configured through `.function`. */ readonly decay: pulumi.Output; /** * Description of the challenge, consider using multiline descriptions for better style. */ readonly description: pulumi.Output; /** * Decay function to define how the challenge value evolve through solves, either linear or logarithmic. */ readonly function: pulumi.Output; /** * The flag validation logic. */ readonly logic: pulumi.Output; /** * Maximum amount of attempts before being unable to flag the challenge. */ readonly maxAttempts: pulumi.Output; /** * The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value. */ readonly minimum: pulumi.Output; /** * Name of the challenge, displayed as it. */ readonly name: pulumi.Output; /** * Suggestion for the end-user as next challenge to work on. */ readonly next: pulumi.Output; /** * List of required challenges that needs to get flagged before this one being accessible. Useful for skill-trees-like strategy CTF. */ readonly requirements: pulumi.Output; /** * State of the challenge, either hidden or visible. */ readonly state: pulumi.Output; /** * List of challenge tags that will be displayed to the end-user. You could use them to give some quick insights of what a challenge involves. */ readonly tags: pulumi.Output; /** * List of challenge topics that are displayed to the administrators for maintenance and planification. */ readonly topics: pulumi.Output; /** * The value (points) of the challenge once solved. It is mapped to `initial` under the hood, but displayed as `value` for consistency with the standard challenge. */ readonly value: pulumi.Output; /** * Create a ChallengeDynamic resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ChallengeDynamicArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ChallengeDynamic resources. */ export interface ChallengeDynamicState { /** * Attribution to the creator(s) of the challenge. */ attribution?: pulumi.Input; /** * Category of the challenge that CTFd groups by on the web UI. */ category?: pulumi.Input; /** * Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests. */ connectionInfo?: pulumi.Input; /** * The decay defines from each number of solves does the decay function triggers until reaching minimum. This function is defined by CTFd and could be configured through `.function`. */ decay?: pulumi.Input; /** * Description of the challenge, consider using multiline descriptions for better style. */ description?: pulumi.Input; /** * Decay function to define how the challenge value evolve through solves, either linear or logarithmic. */ function?: pulumi.Input; /** * The flag validation logic. */ logic?: pulumi.Input; /** * Maximum amount of attempts before being unable to flag the challenge. */ maxAttempts?: pulumi.Input; /** * The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value. */ minimum?: pulumi.Input; /** * Name of the challenge, displayed as it. */ name?: pulumi.Input; /** * Suggestion for the end-user as next challenge to work on. */ next?: pulumi.Input; /** * List of required challenges that needs to get flagged before this one being accessible. Useful for skill-trees-like strategy CTF. */ requirements?: pulumi.Input; /** * State of the challenge, either hidden or visible. */ state?: pulumi.Input; /** * List of challenge tags that will be displayed to the end-user. You could use them to give some quick insights of what a challenge involves. */ tags?: pulumi.Input[]>; /** * List of challenge topics that are displayed to the administrators for maintenance and planification. */ topics?: pulumi.Input[]>; /** * The value (points) of the challenge once solved. It is mapped to `initial` under the hood, but displayed as `value` for consistency with the standard challenge. */ value?: pulumi.Input; } /** * The set of arguments for constructing a ChallengeDynamic resource. */ export interface ChallengeDynamicArgs { /** * Attribution to the creator(s) of the challenge. */ attribution?: pulumi.Input; /** * Category of the challenge that CTFd groups by on the web UI. */ category: pulumi.Input; /** * Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests. */ connectionInfo?: pulumi.Input; /** * The decay defines from each number of solves does the decay function triggers until reaching minimum. This function is defined by CTFd and could be configured through `.function`. */ decay: pulumi.Input; /** * Description of the challenge, consider using multiline descriptions for better style. */ description: pulumi.Input; /** * Decay function to define how the challenge value evolve through solves, either linear or logarithmic. */ function?: pulumi.Input; /** * The flag validation logic. */ logic?: pulumi.Input; /** * Maximum amount of attempts before being unable to flag the challenge. */ maxAttempts?: pulumi.Input; /** * The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value. */ minimum: pulumi.Input; /** * Name of the challenge, displayed as it. */ name?: pulumi.Input; /** * Suggestion for the end-user as next challenge to work on. */ next?: pulumi.Input; /** * List of required challenges that needs to get flagged before this one being accessible. Useful for skill-trees-like strategy CTF. */ requirements?: pulumi.Input; /** * State of the challenge, either hidden or visible. */ state?: pulumi.Input; /** * List of challenge tags that will be displayed to the end-user. You could use them to give some quick insights of what a challenge involves. */ tags?: pulumi.Input[]>; /** * List of challenge topics that are displayed to the administrators for maintenance and planification. */ topics?: pulumi.Input[]>; /** * The value (points) of the challenge once solved. It is mapped to `initial` under the hood, but displayed as `value` for consistency with the standard challenge. */ value: pulumi.Input; }