1. Packages
  2. CTFd Provider
  3. API Docs
  4. Challenge
CTFd v0.1.25 published on Tuesday, Apr 9, 2024 by CTFer.io

ctfd.Challenge

Explore with Pulumi AI

ctfd logo
CTFd v0.1.25 published on Tuesday, Apr 9, 2024 by CTFer.io

    CTFd is built around the Challenge resource, which contains all the attributes to define a part of the Capture The Flag event.

    This provider builds a cleaner API on top of CTFd’s one to improve its adoption and lifecycle management.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ctfd from "@ctfer-io/pulumi-ctfd";
    import * as fs from "fs";
    
    const http = new ctfd.Challenge("http", {
        category: "misc",
        description: "...",
        value: 500,
        decay: 100,
        minimum: 50,
        state: "visible",
        "function": "logarithmic",
        flags: [{
            content: "CTF{some_flag}",
        }],
        topics: ["Misc"],
        tags: [
            "misc",
            "basic",
        ],
        hints: [
            {
                content: "Some super-helpful hint",
                cost: 50,
            },
            {
                content: "Even more helpful hint !",
                cost: 50,
            },
        ],
        files: [{
            name: "image.png",
            contentb64: fs.readFileSync(".../image.png", { encoding: "base64" }),
        }],
    });
    
    import pulumi
    import base64
    import ctfer-io_pulumi-ctfd as ctfd
    
    http = ctfd.Challenge("http",
        category="misc",
        description="...",
        value=500,
        decay=100,
        minimum=50,
        state="visible",
        function="logarithmic",
        flags=[ctfd.ChallengeFlagArgs(
            content="CTF{some_flag}",
        )],
        topics=["Misc"],
        tags=[
            "misc",
            "basic",
        ],
        hints=[
            ctfd.ChallengeHintArgs(
                content="Some super-helpful hint",
                cost=50,
            ),
            ctfd.ChallengeHintArgs(
                content="Even more helpful hint !",
                cost=50,
            ),
        ],
        files=[ctfd.ChallengeFileArgs(
            name="image.png",
            contentb64=(lambda path: base64.b64encode(open(path).read().encode()).decode())(".../image.png"),
        )])
    
    package main
    
    import (
    	"encoding/base64"
    	"os"
    
    	"github.com/ctfer-io/pulumi-ctfd/sdk/go/ctfd"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func filebase64OrPanic(path string) string {
    	if fileData, err := os.ReadFile(path); err == nil {
    		return base64.StdEncoding.EncodeToString(fileData[:])
    	} else {
    		panic(err.Error())
    	}
    }
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ctfd.NewChallenge(ctx, "http", &ctfd.ChallengeArgs{
    			Category:    pulumi.String("misc"),
    			Description: pulumi.String("..."),
    			Value:       pulumi.Int(500),
    			Decay:       pulumi.Int(100),
    			Minimum:     pulumi.Int(50),
    			State:       pulumi.String("visible"),
    			Function:    pulumi.String("logarithmic"),
    			Flags: ctfd.ChallengeFlagArray{
    				&ctfd.ChallengeFlagArgs{
    					Content: pulumi.String("CTF{some_flag}"),
    				},
    			},
    			Topics: pulumi.StringArray{
    				pulumi.String("Misc"),
    			},
    			Tags: pulumi.StringArray{
    				pulumi.String("misc"),
    				pulumi.String("basic"),
    			},
    			Hints: ctfd.ChallengeHintArray{
    				&ctfd.ChallengeHintArgs{
    					Content: pulumi.String("Some super-helpful hint"),
    					Cost:    pulumi.Int(50),
    				},
    				&ctfd.ChallengeHintArgs{
    					Content: pulumi.String("Even more helpful hint !"),
    					Cost:    pulumi.Int(50),
    				},
    			},
    			Files: ctfd.ChallengeFileArray{
    				&ctfd.ChallengeFileArgs{
    					Name:       pulumi.String("image.png"),
    					Contentb64: filebase64OrPanic(".../image.png"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using Pulumi;
    using Ctfd = CTFerio.Ctfd;
    
    	
    string ReadFileBase64(string path) 
    {
        return Convert.ToBase64String(Encoding.UTF8.GetBytes(File.ReadAllText(path)));
    }
    
    return await Deployment.RunAsync(() => 
    {
        var http = new Ctfd.Challenge("http", new()
        {
            Category = "misc",
            Description = "...",
            Value = 500,
            Decay = 100,
            Minimum = 50,
            State = "visible",
            Function = "logarithmic",
            Flags = new[]
            {
                new Ctfd.Inputs.ChallengeFlagArgs
                {
                    Content = "CTF{some_flag}",
                },
            },
            Topics = new[]
            {
                "Misc",
            },
            Tags = new[]
            {
                "misc",
                "basic",
            },
            Hints = new[]
            {
                new Ctfd.Inputs.ChallengeHintArgs
                {
                    Content = "Some super-helpful hint",
                    Cost = 50,
                },
                new Ctfd.Inputs.ChallengeHintArgs
                {
                    Content = "Even more helpful hint !",
                    Cost = 50,
                },
            },
            Files = new[]
            {
                new Ctfd.Inputs.ChallengeFileArgs
                {
                    Name = "image.png",
                    Contentb64 = ReadFileBase64(".../image.png"),
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ctfd.Challenge;
    import com.pulumi.ctfd.ChallengeArgs;
    import com.pulumi.ctfd.inputs.ChallengeFlagArgs;
    import com.pulumi.ctfd.inputs.ChallengeHintArgs;
    import com.pulumi.ctfd.inputs.ChallengeFileArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var http = new Challenge("http", ChallengeArgs.builder()        
                .category("misc")
                .description("...")
                .value(500)
                .decay(100)
                .minimum(50)
                .state("visible")
                .function("logarithmic")
                .flags(ChallengeFlagArgs.builder()
                    .content("CTF{some_flag}")
                    .build())
                .topics("Misc")
                .tags(            
                    "misc",
                    "basic")
                .hints(            
                    ChallengeHintArgs.builder()
                        .content("Some super-helpful hint")
                        .cost(50)
                        .build(),
                    ChallengeHintArgs.builder()
                        .content("Even more helpful hint !")
                        .cost(50)
                        .build())
                .files(ChallengeFileArgs.builder()
                    .name("image.png")
                    .contentb64(Base64.getEncoder().encodeToString(Files.readAllBytes(Paths.get(".../image.png"))))
                    .build())
                .build());
    
        }
    }
    
    Coming soon!
    

    Create Challenge Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Challenge(name: string, args: ChallengeArgs, opts?: CustomResourceOptions);
    @overload
    def Challenge(resource_name: str,
                  args: ChallengeArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def Challenge(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  description: Optional[str] = None,
                  value: Optional[int] = None,
                  category: Optional[str] = None,
                  max_attempts: Optional[int] = None,
                  name: Optional[str] = None,
                  flags: Optional[Sequence[ChallengeFlagArgs]] = None,
                  function: Optional[str] = None,
                  hints: Optional[Sequence[ChallengeHintArgs]] = None,
                  decay: Optional[int] = None,
                  minimum: Optional[int] = None,
                  files: Optional[Sequence[ChallengeFileArgs]] = None,
                  next: Optional[int] = None,
                  requirements: Optional[ChallengeRequirementsArgs] = None,
                  state: Optional[str] = None,
                  tags: Optional[Sequence[str]] = None,
                  topics: Optional[Sequence[str]] = None,
                  type: Optional[str] = None,
                  connection_info: Optional[str] = None)
    func NewChallenge(ctx *Context, name string, args ChallengeArgs, opts ...ResourceOption) (*Challenge, error)
    public Challenge(string name, ChallengeArgs args, CustomResourceOptions? opts = null)
    public Challenge(String name, ChallengeArgs args)
    public Challenge(String name, ChallengeArgs args, CustomResourceOptions options)
    
    type: ctfd:Challenge
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ChallengeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ChallengeArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ChallengeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ChallengeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ChallengeArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var challengeResource = new Ctfd.Challenge("challengeResource", new()
    {
        Description = "string",
        Value = 0,
        Category = "string",
        MaxAttempts = 0,
        Name = "string",
        Flags = new[]
        {
            new Ctfd.Inputs.ChallengeFlagArgs
            {
                Content = "string",
                Data = "string",
                Id = "string",
                Type = "string",
            },
        },
        Function = "string",
        Hints = new[]
        {
            new Ctfd.Inputs.ChallengeHintArgs
            {
                Content = "string",
                Cost = 0,
                Id = "string",
                Requirements = new[]
                {
                    "string",
                },
            },
        },
        Decay = 0,
        Minimum = 0,
        Files = new[]
        {
            new Ctfd.Inputs.ChallengeFileArgs
            {
                Name = "string",
                Content = "string",
                Contentb64 = "string",
                Id = "string",
                Location = "string",
                Sha1sum = "string",
            },
        },
        Next = 0,
        Requirements = new Ctfd.Inputs.ChallengeRequirementsArgs
        {
            Behavior = "string",
            Prerequisites = new[]
            {
                "string",
            },
        },
        State = "string",
        Tags = new[]
        {
            "string",
        },
        Topics = new[]
        {
            "string",
        },
        Type = "string",
        ConnectionInfo = "string",
    });
    
    example, err := ctfd.NewChallenge(ctx, "challengeResource", &ctfd.ChallengeArgs{
    	Description: pulumi.String("string"),
    	Value:       pulumi.Int(0),
    	Category:    pulumi.String("string"),
    	MaxAttempts: pulumi.Int(0),
    	Name:        pulumi.String("string"),
    	Flags: ctfd.ChallengeFlagArray{
    		&ctfd.ChallengeFlagArgs{
    			Content: pulumi.String("string"),
    			Data:    pulumi.String("string"),
    			Id:      pulumi.String("string"),
    			Type:    pulumi.String("string"),
    		},
    	},
    	Function: pulumi.String("string"),
    	Hints: ctfd.ChallengeHintArray{
    		&ctfd.ChallengeHintArgs{
    			Content: pulumi.String("string"),
    			Cost:    pulumi.Int(0),
    			Id:      pulumi.String("string"),
    			Requirements: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Decay:   pulumi.Int(0),
    	Minimum: pulumi.Int(0),
    	Files: ctfd.ChallengeFileArray{
    		&ctfd.ChallengeFileArgs{
    			Name:       pulumi.String("string"),
    			Content:    pulumi.String("string"),
    			Contentb64: pulumi.String("string"),
    			Id:         pulumi.String("string"),
    			Location:   pulumi.String("string"),
    			Sha1sum:    pulumi.String("string"),
    		},
    	},
    	Next: pulumi.Int(0),
    	Requirements: &ctfd.ChallengeRequirementsArgs{
    		Behavior: pulumi.String("string"),
    		Prerequisites: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	State: pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Topics: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Type:           pulumi.String("string"),
    	ConnectionInfo: pulumi.String("string"),
    })
    
    var challengeResource = new Challenge("challengeResource", ChallengeArgs.builder()        
        .description("string")
        .value(0)
        .category("string")
        .maxAttempts(0)
        .name("string")
        .flags(ChallengeFlagArgs.builder()
            .content("string")
            .data("string")
            .id("string")
            .type("string")
            .build())
        .function("string")
        .hints(ChallengeHintArgs.builder()
            .content("string")
            .cost(0)
            .id("string")
            .requirements("string")
            .build())
        .decay(0)
        .minimum(0)
        .files(ChallengeFileArgs.builder()
            .name("string")
            .content("string")
            .contentb64("string")
            .id("string")
            .location("string")
            .sha1sum("string")
            .build())
        .next(0)
        .requirements(ChallengeRequirementsArgs.builder()
            .behavior("string")
            .prerequisites("string")
            .build())
        .state("string")
        .tags("string")
        .topics("string")
        .type("string")
        .connectionInfo("string")
        .build());
    
    challenge_resource = ctfd.Challenge("challengeResource",
        description="string",
        value=0,
        category="string",
        max_attempts=0,
        name="string",
        flags=[ctfd.ChallengeFlagArgs(
            content="string",
            data="string",
            id="string",
            type="string",
        )],
        function="string",
        hints=[ctfd.ChallengeHintArgs(
            content="string",
            cost=0,
            id="string",
            requirements=["string"],
        )],
        decay=0,
        minimum=0,
        files=[ctfd.ChallengeFileArgs(
            name="string",
            content="string",
            contentb64="string",
            id="string",
            location="string",
            sha1sum="string",
        )],
        next=0,
        requirements=ctfd.ChallengeRequirementsArgs(
            behavior="string",
            prerequisites=["string"],
        ),
        state="string",
        tags=["string"],
        topics=["string"],
        type="string",
        connection_info="string")
    
    const challengeResource = new ctfd.Challenge("challengeResource", {
        description: "string",
        value: 0,
        category: "string",
        maxAttempts: 0,
        name: "string",
        flags: [{
            content: "string",
            data: "string",
            id: "string",
            type: "string",
        }],
        "function": "string",
        hints: [{
            content: "string",
            cost: 0,
            id: "string",
            requirements: ["string"],
        }],
        decay: 0,
        minimum: 0,
        files: [{
            name: "string",
            content: "string",
            contentb64: "string",
            id: "string",
            location: "string",
            sha1sum: "string",
        }],
        next: 0,
        requirements: {
            behavior: "string",
            prerequisites: ["string"],
        },
        state: "string",
        tags: ["string"],
        topics: ["string"],
        type: "string",
        connectionInfo: "string",
    });
    
    type: ctfd:Challenge
    properties:
        category: string
        connectionInfo: string
        decay: 0
        description: string
        files:
            - content: string
              contentb64: string
              id: string
              location: string
              name: string
              sha1sum: string
        flags:
            - content: string
              data: string
              id: string
              type: string
        function: string
        hints:
            - content: string
              cost: 0
              id: string
              requirements:
                - string
        maxAttempts: 0
        minimum: 0
        name: string
        next: 0
        requirements:
            behavior: string
            prerequisites:
                - string
        state: string
        tags:
            - string
        topics:
            - string
        type: string
        value: 0
    

    Challenge Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Challenge resource accepts the following input properties:

    Category string
    Category of the challenge that CTFd groups by on the web UI.
    Description string
    Description of the challenge, consider using multiline descriptions for better style.
    Value int
    The value (points) of the challenge once solved. Internally, the provider will handle what target is legitimate depending on the .type value, i.e. either value for "standard" or initial for "dynamic".
    ConnectionInfo string
    Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
    Decay int
    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.
    Files List<CTFerio.Ctfd.Inputs.ChallengeFile>
    List of files given to players to flag the challenge.
    Flags List<CTFerio.Ctfd.Inputs.ChallengeFlag>
    List of challenge flags that solves it.
    Function string
    Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
    Hints List<CTFerio.Ctfd.Inputs.ChallengeHint>
    List of hints about the challenge displayed to the end-user.
    MaxAttempts int
    Maximum amount of attempts before being unable to flag the challenge.
    Minimum int
    The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
    Name string
    Name of the file as displayed to end-users.
    Next int
    Suggestion for the end-user as next challenge to work on.
    Requirements CTFerio.Ctfd.Inputs.ChallengeRequirements
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    State string
    State of the challenge, either hidden or visible.
    Tags List<string>
    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.
    Topics List<string>
    List of challenge topics that are displayed to the administrators for maintenance and planification.
    Type string
    The type of the flag, could be either static or regex
    Category string
    Category of the challenge that CTFd groups by on the web UI.
    Description string
    Description of the challenge, consider using multiline descriptions for better style.
    Value int
    The value (points) of the challenge once solved. Internally, the provider will handle what target is legitimate depending on the .type value, i.e. either value for "standard" or initial for "dynamic".
    ConnectionInfo string
    Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
    Decay int
    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.
    Files []ChallengeFileArgs
    List of files given to players to flag the challenge.
    Flags []ChallengeFlagArgs
    List of challenge flags that solves it.
    Function string
    Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
    Hints []ChallengeHintArgs
    List of hints about the challenge displayed to the end-user.
    MaxAttempts int
    Maximum amount of attempts before being unable to flag the challenge.
    Minimum int
    The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
    Name string
    Name of the file as displayed to end-users.
    Next int
    Suggestion for the end-user as next challenge to work on.
    Requirements ChallengeRequirementsArgs
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    State string
    State of the challenge, either hidden or visible.
    Tags []string
    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.
    Topics []string
    List of challenge topics that are displayed to the administrators for maintenance and planification.
    Type string
    The type of the flag, could be either static or regex
    category String
    Category of the challenge that CTFd groups by on the web UI.
    description String
    Description of the challenge, consider using multiline descriptions for better style.
    value Integer
    The value (points) of the challenge once solved. Internally, the provider will handle what target is legitimate depending on the .type value, i.e. either value for "standard" or initial for "dynamic".
    connectionInfo String
    Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
    decay Integer
    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.
    files List<ChallengeFile>
    List of files given to players to flag the challenge.
    flags List<ChallengeFlag>
    List of challenge flags that solves it.
    function String
    Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
    hints List<ChallengeHint>
    List of hints about the challenge displayed to the end-user.
    maxAttempts Integer
    Maximum amount of attempts before being unable to flag the challenge.
    minimum Integer
    The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
    name String
    Name of the file as displayed to end-users.
    next Integer
    Suggestion for the end-user as next challenge to work on.
    requirements ChallengeRequirements
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    state String
    State of the challenge, either hidden or visible.
    tags List<String>
    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.
    topics List<String>
    List of challenge topics that are displayed to the administrators for maintenance and planification.
    type String
    The type of the flag, could be either static or regex
    category string
    Category of the challenge that CTFd groups by on the web UI.
    description string
    Description of the challenge, consider using multiline descriptions for better style.
    value number
    The value (points) of the challenge once solved. Internally, the provider will handle what target is legitimate depending on the .type value, i.e. either value for "standard" or initial for "dynamic".
    connectionInfo string
    Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
    decay number
    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.
    files ChallengeFile[]
    List of files given to players to flag the challenge.
    flags ChallengeFlag[]
    List of challenge flags that solves it.
    function string
    Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
    hints ChallengeHint[]
    List of hints about the challenge displayed to the end-user.
    maxAttempts number
    Maximum amount of attempts before being unable to flag the challenge.
    minimum number
    The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
    name string
    Name of the file as displayed to end-users.
    next number
    Suggestion for the end-user as next challenge to work on.
    requirements ChallengeRequirements
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    state string
    State of the challenge, either hidden or visible.
    tags string[]
    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.
    topics string[]
    List of challenge topics that are displayed to the administrators for maintenance and planification.
    type string
    The type of the flag, could be either static or regex
    category str
    Category of the challenge that CTFd groups by on the web UI.
    description str
    Description of the challenge, consider using multiline descriptions for better style.
    value int
    The value (points) of the challenge once solved. Internally, the provider will handle what target is legitimate depending on the .type value, i.e. either value for "standard" or initial for "dynamic".
    connection_info str
    Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
    decay int
    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.
    files Sequence[ChallengeFileArgs]
    List of files given to players to flag the challenge.
    flags Sequence[ChallengeFlagArgs]
    List of challenge flags that solves it.
    function str
    Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
    hints Sequence[ChallengeHintArgs]
    List of hints about the challenge displayed to the end-user.
    max_attempts int
    Maximum amount of attempts before being unable to flag the challenge.
    minimum int
    The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
    name str
    Name of the file as displayed to end-users.
    next int
    Suggestion for the end-user as next challenge to work on.
    requirements ChallengeRequirementsArgs
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    state str
    State of the challenge, either hidden or visible.
    tags Sequence[str]
    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.
    topics Sequence[str]
    List of challenge topics that are displayed to the administrators for maintenance and planification.
    type str
    The type of the flag, could be either static or regex
    category String
    Category of the challenge that CTFd groups by on the web UI.
    description String
    Description of the challenge, consider using multiline descriptions for better style.
    value Number
    The value (points) of the challenge once solved. Internally, the provider will handle what target is legitimate depending on the .type value, i.e. either value for "standard" or initial for "dynamic".
    connectionInfo String
    Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
    decay Number
    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.
    files List<Property Map>
    List of files given to players to flag the challenge.
    flags List<Property Map>
    List of challenge flags that solves it.
    function String
    Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
    hints List<Property Map>
    List of hints about the challenge displayed to the end-user.
    maxAttempts Number
    Maximum amount of attempts before being unable to flag the challenge.
    minimum Number
    The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
    name String
    Name of the file as displayed to end-users.
    next Number
    Suggestion for the end-user as next challenge to work on.
    requirements Property Map
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    state String
    State of the challenge, either hidden or visible.
    tags List<String>
    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.
    topics List<String>
    List of challenge topics that are displayed to the administrators for maintenance and planification.
    type String
    The type of the flag, could be either static or regex

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Challenge resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Challenge Resource

    Get an existing Challenge resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ChallengeState, opts?: CustomResourceOptions): Challenge
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            category: Optional[str] = None,
            connection_info: Optional[str] = None,
            decay: Optional[int] = None,
            description: Optional[str] = None,
            files: Optional[Sequence[ChallengeFileArgs]] = None,
            flags: Optional[Sequence[ChallengeFlagArgs]] = None,
            function: Optional[str] = None,
            hints: Optional[Sequence[ChallengeHintArgs]] = None,
            max_attempts: Optional[int] = None,
            minimum: Optional[int] = None,
            name: Optional[str] = None,
            next: Optional[int] = None,
            requirements: Optional[ChallengeRequirementsArgs] = None,
            state: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            topics: Optional[Sequence[str]] = None,
            type: Optional[str] = None,
            value: Optional[int] = None) -> Challenge
    func GetChallenge(ctx *Context, name string, id IDInput, state *ChallengeState, opts ...ResourceOption) (*Challenge, error)
    public static Challenge Get(string name, Input<string> id, ChallengeState? state, CustomResourceOptions? opts = null)
    public static Challenge get(String name, Output<String> id, ChallengeState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Category string
    Category of the challenge that CTFd groups by on the web UI.
    ConnectionInfo string
    Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
    Decay int
    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.
    Description string
    Description of the challenge, consider using multiline descriptions for better style.
    Files List<CTFerio.Ctfd.Inputs.ChallengeFile>
    List of files given to players to flag the challenge.
    Flags List<CTFerio.Ctfd.Inputs.ChallengeFlag>
    List of challenge flags that solves it.
    Function string
    Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
    Hints List<CTFerio.Ctfd.Inputs.ChallengeHint>
    List of hints about the challenge displayed to the end-user.
    MaxAttempts int
    Maximum amount of attempts before being unable to flag the challenge.
    Minimum int
    The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
    Name string
    Name of the file as displayed to end-users.
    Next int
    Suggestion for the end-user as next challenge to work on.
    Requirements CTFerio.Ctfd.Inputs.ChallengeRequirements
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    State string
    State of the challenge, either hidden or visible.
    Tags List<string>
    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.
    Topics List<string>
    List of challenge topics that are displayed to the administrators for maintenance and planification.
    Type string
    The type of the flag, could be either static or regex
    Value int
    The value (points) of the challenge once solved. Internally, the provider will handle what target is legitimate depending on the .type value, i.e. either value for "standard" or initial for "dynamic".
    Category string
    Category of the challenge that CTFd groups by on the web UI.
    ConnectionInfo string
    Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
    Decay int
    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.
    Description string
    Description of the challenge, consider using multiline descriptions for better style.
    Files []ChallengeFileArgs
    List of files given to players to flag the challenge.
    Flags []ChallengeFlagArgs
    List of challenge flags that solves it.
    Function string
    Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
    Hints []ChallengeHintArgs
    List of hints about the challenge displayed to the end-user.
    MaxAttempts int
    Maximum amount of attempts before being unable to flag the challenge.
    Minimum int
    The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
    Name string
    Name of the file as displayed to end-users.
    Next int
    Suggestion for the end-user as next challenge to work on.
    Requirements ChallengeRequirementsArgs
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    State string
    State of the challenge, either hidden or visible.
    Tags []string
    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.
    Topics []string
    List of challenge topics that are displayed to the administrators for maintenance and planification.
    Type string
    The type of the flag, could be either static or regex
    Value int
    The value (points) of the challenge once solved. Internally, the provider will handle what target is legitimate depending on the .type value, i.e. either value for "standard" or initial for "dynamic".
    category String
    Category of the challenge that CTFd groups by on the web UI.
    connectionInfo String
    Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
    decay Integer
    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.
    description String
    Description of the challenge, consider using multiline descriptions for better style.
    files List<ChallengeFile>
    List of files given to players to flag the challenge.
    flags List<ChallengeFlag>
    List of challenge flags that solves it.
    function String
    Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
    hints List<ChallengeHint>
    List of hints about the challenge displayed to the end-user.
    maxAttempts Integer
    Maximum amount of attempts before being unable to flag the challenge.
    minimum Integer
    The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
    name String
    Name of the file as displayed to end-users.
    next Integer
    Suggestion for the end-user as next challenge to work on.
    requirements ChallengeRequirements
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    state String
    State of the challenge, either hidden or visible.
    tags List<String>
    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.
    topics List<String>
    List of challenge topics that are displayed to the administrators for maintenance and planification.
    type String
    The type of the flag, could be either static or regex
    value Integer
    The value (points) of the challenge once solved. Internally, the provider will handle what target is legitimate depending on the .type value, i.e. either value for "standard" or initial for "dynamic".
    category string
    Category of the challenge that CTFd groups by on the web UI.
    connectionInfo string
    Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
    decay number
    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.
    description string
    Description of the challenge, consider using multiline descriptions for better style.
    files ChallengeFile[]
    List of files given to players to flag the challenge.
    flags ChallengeFlag[]
    List of challenge flags that solves it.
    function string
    Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
    hints ChallengeHint[]
    List of hints about the challenge displayed to the end-user.
    maxAttempts number
    Maximum amount of attempts before being unable to flag the challenge.
    minimum number
    The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
    name string
    Name of the file as displayed to end-users.
    next number
    Suggestion for the end-user as next challenge to work on.
    requirements ChallengeRequirements
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    state string
    State of the challenge, either hidden or visible.
    tags string[]
    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.
    topics string[]
    List of challenge topics that are displayed to the administrators for maintenance and planification.
    type string
    The type of the flag, could be either static or regex
    value number
    The value (points) of the challenge once solved. Internally, the provider will handle what target is legitimate depending on the .type value, i.e. either value for "standard" or initial for "dynamic".
    category str
    Category of the challenge that CTFd groups by on the web UI.
    connection_info str
    Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
    decay int
    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.
    description str
    Description of the challenge, consider using multiline descriptions for better style.
    files Sequence[ChallengeFileArgs]
    List of files given to players to flag the challenge.
    flags Sequence[ChallengeFlagArgs]
    List of challenge flags that solves it.
    function str
    Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
    hints Sequence[ChallengeHintArgs]
    List of hints about the challenge displayed to the end-user.
    max_attempts int
    Maximum amount of attempts before being unable to flag the challenge.
    minimum int
    The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
    name str
    Name of the file as displayed to end-users.
    next int
    Suggestion for the end-user as next challenge to work on.
    requirements ChallengeRequirementsArgs
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    state str
    State of the challenge, either hidden or visible.
    tags Sequence[str]
    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.
    topics Sequence[str]
    List of challenge topics that are displayed to the administrators for maintenance and planification.
    type str
    The type of the flag, could be either static or regex
    value int
    The value (points) of the challenge once solved. Internally, the provider will handle what target is legitimate depending on the .type value, i.e. either value for "standard" or initial for "dynamic".
    category String
    Category of the challenge that CTFd groups by on the web UI.
    connectionInfo String
    Connection Information to connect to the challenge instance, useful for pwn, web and infrastructure pentests.
    decay Number
    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.
    description String
    Description of the challenge, consider using multiline descriptions for better style.
    files List<Property Map>
    List of files given to players to flag the challenge.
    flags List<Property Map>
    List of challenge flags that solves it.
    function String
    Decay function to define how the challenge value evolve through solves, either linear or logarithmic.
    hints List<Property Map>
    List of hints about the challenge displayed to the end-user.
    maxAttempts Number
    Maximum amount of attempts before being unable to flag the challenge.
    minimum Number
    The minimum points for a dynamic-score challenge to reach with the decay function. Once there, no solve could have more value.
    name String
    Name of the file as displayed to end-users.
    next Number
    Suggestion for the end-user as next challenge to work on.
    requirements Property Map
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    state String
    State of the challenge, either hidden or visible.
    tags List<String>
    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.
    topics List<String>
    List of challenge topics that are displayed to the administrators for maintenance and planification.
    type String
    The type of the flag, could be either static or regex
    value Number
    The value (points) of the challenge once solved. Internally, the provider will handle what target is legitimate depending on the .type value, i.e. either value for "standard" or initial for "dynamic".

    Supporting Types

    ChallengeFile, ChallengeFileArgs

    Name string
    Name of the file as displayed to end-users.
    Content string
    Raw content of the file, perfectly fit the use-cases of a .txt document or anything with a simple binary content. You could provide it from the file-system using file("${path.module}/...").
    Contentb64 string
    Base 64 content of the file, perfectly fit the use-cases of complex binaries. You could provide it from the file-system using filebase64("${path.module}/...").
    Id string
    Identifier of the file, used internally to handle the CTFd corresponding object.
    Location string
    Location where the file is stored on the CTFd instance, for download purposes.
    Sha1sum string
    The sha1 sum of the file.
    Name string
    Name of the file as displayed to end-users.
    Content string
    Raw content of the file, perfectly fit the use-cases of a .txt document or anything with a simple binary content. You could provide it from the file-system using file("${path.module}/...").
    Contentb64 string
    Base 64 content of the file, perfectly fit the use-cases of complex binaries. You could provide it from the file-system using filebase64("${path.module}/...").
    Id string
    Identifier of the file, used internally to handle the CTFd corresponding object.
    Location string
    Location where the file is stored on the CTFd instance, for download purposes.
    Sha1sum string
    The sha1 sum of the file.
    name String
    Name of the file as displayed to end-users.
    content String
    Raw content of the file, perfectly fit the use-cases of a .txt document or anything with a simple binary content. You could provide it from the file-system using file("${path.module}/...").
    contentb64 String
    Base 64 content of the file, perfectly fit the use-cases of complex binaries. You could provide it from the file-system using filebase64("${path.module}/...").
    id String
    Identifier of the file, used internally to handle the CTFd corresponding object.
    location String
    Location where the file is stored on the CTFd instance, for download purposes.
    sha1sum String
    The sha1 sum of the file.
    name string
    Name of the file as displayed to end-users.
    content string
    Raw content of the file, perfectly fit the use-cases of a .txt document or anything with a simple binary content. You could provide it from the file-system using file("${path.module}/...").
    contentb64 string
    Base 64 content of the file, perfectly fit the use-cases of complex binaries. You could provide it from the file-system using filebase64("${path.module}/...").
    id string
    Identifier of the file, used internally to handle the CTFd corresponding object.
    location string
    Location where the file is stored on the CTFd instance, for download purposes.
    sha1sum string
    The sha1 sum of the file.
    name str
    Name of the file as displayed to end-users.
    content str
    Raw content of the file, perfectly fit the use-cases of a .txt document or anything with a simple binary content. You could provide it from the file-system using file("${path.module}/...").
    contentb64 str
    Base 64 content of the file, perfectly fit the use-cases of complex binaries. You could provide it from the file-system using filebase64("${path.module}/...").
    id str
    Identifier of the file, used internally to handle the CTFd corresponding object.
    location str
    Location where the file is stored on the CTFd instance, for download purposes.
    sha1sum str
    The sha1 sum of the file.
    name String
    Name of the file as displayed to end-users.
    content String
    Raw content of the file, perfectly fit the use-cases of a .txt document or anything with a simple binary content. You could provide it from the file-system using file("${path.module}/...").
    contentb64 String
    Base 64 content of the file, perfectly fit the use-cases of complex binaries. You could provide it from the file-system using filebase64("${path.module}/...").
    id String
    Identifier of the file, used internally to handle the CTFd corresponding object.
    location String
    Location where the file is stored on the CTFd instance, for download purposes.
    sha1sum String
    The sha1 sum of the file.

    ChallengeFlag, ChallengeFlagArgs

    Content string
    The actual flag to match. Consider using the convention MYCTF{value} with MYCTF being the shortcode of your event's name and value depending on each challenge.
    Data string
    The flag sensitivity information, either casesensitive or caseinsensitive
    Id string
    Identifier of the flag, used internally to handle the CTFd corresponding object.
    Type string
    The type of the flag, could be either static or regex
    Content string
    The actual flag to match. Consider using the convention MYCTF{value} with MYCTF being the shortcode of your event's name and value depending on each challenge.
    Data string
    The flag sensitivity information, either casesensitive or caseinsensitive
    Id string
    Identifier of the flag, used internally to handle the CTFd corresponding object.
    Type string
    The type of the flag, could be either static or regex
    content String
    The actual flag to match. Consider using the convention MYCTF{value} with MYCTF being the shortcode of your event's name and value depending on each challenge.
    data String
    The flag sensitivity information, either casesensitive or caseinsensitive
    id String
    Identifier of the flag, used internally to handle the CTFd corresponding object.
    type String
    The type of the flag, could be either static or regex
    content string
    The actual flag to match. Consider using the convention MYCTF{value} with MYCTF being the shortcode of your event's name and value depending on each challenge.
    data string
    The flag sensitivity information, either casesensitive or caseinsensitive
    id string
    Identifier of the flag, used internally to handle the CTFd corresponding object.
    type string
    The type of the flag, could be either static or regex
    content str
    The actual flag to match. Consider using the convention MYCTF{value} with MYCTF being the shortcode of your event's name and value depending on each challenge.
    data str
    The flag sensitivity information, either casesensitive or caseinsensitive
    id str
    Identifier of the flag, used internally to handle the CTFd corresponding object.
    type str
    The type of the flag, could be either static or regex
    content String
    The actual flag to match. Consider using the convention MYCTF{value} with MYCTF being the shortcode of your event's name and value depending on each challenge.
    data String
    The flag sensitivity information, either casesensitive or caseinsensitive
    id String
    Identifier of the flag, used internally to handle the CTFd corresponding object.
    type String
    The type of the flag, could be either static or regex

    ChallengeHint, ChallengeHintArgs

    Content string
    Content of the hint as displayed to the end-user.
    Cost int
    Cost of the hint, and if any specified, the end-user will consume its own (or team) points to get it.
    Id string
    Identifier of the hint, used internally to handle the CTFd corresponding object.
    Requirements List<string>
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    Content string
    Content of the hint as displayed to the end-user.
    Cost int
    Cost of the hint, and if any specified, the end-user will consume its own (or team) points to get it.
    Id string
    Identifier of the hint, used internally to handle the CTFd corresponding object.
    Requirements []string
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    content String
    Content of the hint as displayed to the end-user.
    cost Integer
    Cost of the hint, and if any specified, the end-user will consume its own (or team) points to get it.
    id String
    Identifier of the hint, used internally to handle the CTFd corresponding object.
    requirements List<String>
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    content string
    Content of the hint as displayed to the end-user.
    cost number
    Cost of the hint, and if any specified, the end-user will consume its own (or team) points to get it.
    id string
    Identifier of the hint, used internally to handle the CTFd corresponding object.
    requirements string[]
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    content str
    Content of the hint as displayed to the end-user.
    cost int
    Cost of the hint, and if any specified, the end-user will consume its own (or team) points to get it.
    id str
    Identifier of the hint, used internally to handle the CTFd corresponding object.
    requirements Sequence[str]
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.
    content String
    Content of the hint as displayed to the end-user.
    cost Number
    Cost of the hint, and if any specified, the end-user will consume its own (or team) points to get it.
    id String
    Identifier of the hint, used internally to handle the CTFd corresponding object.
    requirements List<String>
    Other hints required to be consumed before getting this one. Useful for cost-increasing hint strategies with more and more help.

    ChallengeRequirements, ChallengeRequirementsArgs

    Behavior string
    Behavior if not unlocked, either hidden or anonymized.
    Prerequisites List<string>
    List of the challenges ID.
    Behavior string
    Behavior if not unlocked, either hidden or anonymized.
    Prerequisites []string
    List of the challenges ID.
    behavior String
    Behavior if not unlocked, either hidden or anonymized.
    prerequisites List<String>
    List of the challenges ID.
    behavior string
    Behavior if not unlocked, either hidden or anonymized.
    prerequisites string[]
    List of the challenges ID.
    behavior str
    Behavior if not unlocked, either hidden or anonymized.
    prerequisites Sequence[str]
    List of the challenges ID.
    behavior String
    Behavior if not unlocked, either hidden or anonymized.
    prerequisites List<String>
    List of the challenges ID.

    Package Details

    Repository
    ctfd ctfer-io/pulumi-ctfd
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ctfd Terraform Provider.
    ctfd logo
    CTFd v0.1.25 published on Tuesday, Apr 9, 2024 by CTFer.io