Skip to content

Commit

Permalink
feat(api): support CTFd v3.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pandatix committed Oct 9, 2024
1 parent f1276d7 commit 2814789
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
services:
ctfd:
image: ctfd/ctfd:3.7.3@sha256:90470e1fe0f93028ce6ac197b8942916ee157d4b5d33c8266c5bec7662e55ac3
image: ctfd/ctfd:3.7.4@sha256:b2cc1ff1767d919282cf9811ec41a9a4f994d502f502b4a8852999ffb1b7e81a
ports:
- 8000:8000
steps:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

Golang client for interacting with [CTFd](https://ctfd.io/).

Last version tested on: [3.7.3](https://github.com/CTFd/CTFd/releases/tag/3.7.3).
Last version tested on: [3.7.4](https://github.com/CTFd/CTFd/releases/tag/3.7.4).
2 changes: 2 additions & 0 deletions api/challenges.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type PostChallengesParams struct {
Name string `json:"name"`
Category string `json:"category"`
Description string `json:"description"`
Attribution *string `json:"attribution,omitempty"`
Function string `json:"function"`
ConnectionInfo *string `json:"connection_info,omitempty"`
Value int `json:"value"`
Expand Down Expand Up @@ -81,6 +82,7 @@ type PatchChallengeParams struct {
Name string `json:"name"`
Category string `json:"category"`
Description string `json:"description"`
Attribution *string `json:"attribution,omitempty"`
Function string `json:"function"`
ConnectionInfo *string `json:"connection_info,omitempty"`
Value *int `json:"value,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions api/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ type (
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Attribution *string `json:"attribution"`
ConnectionInfo *string `json:"connection_info,omitempty"`
MaxAttempts *int `json:"max_attempts,omitempty"`
Function string `json:"function"`
Expand Down
2 changes: 2 additions & 0 deletions examples/setup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func main() {
Name: "Break The License 1/2",
Category: "crypto",
Description: "...",
Attribution: ptr("pandatix"),
Function: "logarithmic",
ConnectionInfo: ptr("ssh -l user@crypto1.ctfer.io"),
MaxAttempts: ptr(3),
Expand Down Expand Up @@ -121,6 +122,7 @@ func main() {
Name: ch.Name,
Category: ch.Category,
Description: ch.Description,
Attribution: ch.Attribution,
Function: ch.Function,
ConnectionInfo: ch.ConnectionInfo,
Initial: ch.Initial,
Expand Down

0 comments on commit 2814789

Please sign in to comment.