Documentation ¶
Index ¶
- Constants
- func Authenticate() error
- func Check() error
- func DownloadFiles(files []string, outputPath string) error
- func GenerateIndex(challenges []ChallengesData, outputPath string) error
- func GetDescription(challenge *ChallengeData, challengePath string) error
- func NewClient() *scraper.Client
- func SubmitFlag(submission Submission) error
- type CTFOpts
- type ChallengeData
- type ChallengesData
- type Hint
- type Solves
- type Submission
- type Team
- type TopTeamData
Constants ¶
View Source
const ( // Constants for max file sizes (1mb, 5mb, 25mb, 100mb, 0) NoFileSizeLimit = 0 OneMB = 1000000 FiveMB = 5000000 TwentyFiveMB = 25000000 OneHundredMB = 100000000 TwoHhundredFiftyMB = 250000000 )
Variables ¶
This section is empty.
Functions ¶
func Authenticate ¶ added in v0.1.10
func Authenticate() error
Authenticate will attempt to authenticate the client with the provided username and password.
func Check ¶ added in v0.1.10
func Check() error
Check will check if the instance is a CTFd instance.
func DownloadFiles ¶ added in v0.1.10
DownloadFiles will download all the files of a challenge by ID and save them to the given directory
func GenerateIndex ¶ added in v0.2.0
func GenerateIndex(challenges []ChallengesData, outputPath string) error
GenerateIndex generates an index.md file with a list of all challenges in their respective categories
func GetDescription ¶ added in v0.1.10
func GetDescription(challenge *ChallengeData, challengePath string) error
GetDescription retrieves a challenge and returns a writeup template of the challenge
func SubmitFlag ¶ added in v0.1.10
func SubmitFlag(submission Submission) error
Types ¶
type CTFOpts ¶ added in v0.1.10
type ChallengeData ¶
type ChallengeData struct { ID int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` ConnectionInfo string `json:"connection_info"` NextID int64 `json:"next_id"` Attempts int64 `json:"attempts"` MaxAttempts int64 `json:"max_attempts"` Value int64 `json:"value"` Category string `json:"category"` Type string `json:"type"` TypeData struct { ID string `json:"id"` Name string `json:"name"` Templates struct { Create string `json:"create"` Update string `json:"update"` View string `json:"view"` } `json:"templates"` Scripts struct { Create string `json:"create"` Update string `json:"update"` View string `json:"view"` } `json:"scripts"` } `json:"type_data"` State string `json:"state"` Solves int64 `json:"solves"` SolvedByMe bool `json:"solved_by_me"` Files []string `json:"files"` Hints []Hint `json:"hints"` Tags []interface{} `json:"tags"` }
func Challenge ¶
func Challenge(id int64) (*ChallengeData, error)
Challenge returns a challenge by ID
type ChallengesData ¶ added in v0.1.10
type ChallengesData struct { ID int64 `json:"id"` Type string `json:"type"` Name string `json:"name"` Value int64 `json:"value"` Solves int64 `json:"solves"` SolvedByMe bool `json:"solved_by_me"` Category string `json:"category"` Tags []interface{} `json:"tags"` }
func ListChallenges ¶ added in v0.1.10
func ListChallenges() ([]ChallengesData, error)
ListChallenges returns a list of challenges
type Submission ¶ added in v0.1.10
type TopTeamData ¶ added in v0.0.2
type TopTeamData struct { Num1 Team `json:"1"` Num2 Team `json:"2"` Num3 Team `json:"3"` Num4 Team `json:"4"` Num5 Team `json:"5"` Num6 Team `json:"6"` Num7 Team `json:"7"` Num8 Team `json:"8"` Num9 Team `json:"9"` Num10 Team `json:"10"` }
func ScoreboardTop ¶ added in v0.1.10
func ScoreboardTop(count int64) (TopTeamData, error)
ScoreboardTop returns the top teams on the scoreboard
Click to show internal directories.
Click to hide internal directories.