diff options
author | maride <maride@darknebu.la> | 2018-08-14 23:24:40 +0200 |
---|---|---|
committer | maride <maride@darknebu.la> | 2018-08-14 23:24:40 +0200 |
commit | 83537a94d26509be51e4458e6c9c09df5970de93 (patch) | |
tree | 66aa4e7c1f1184a5adab0d6123471d0f20602e40 /src/challenge.go | |
parent | 00c520f9653a72314a2e9ac2311e68421281688f (diff) |
Add submit functionality for flags, and keep track of wrong tries
Diffstat (limited to 'src/challenge.go')
-rw-r--r-- | src/challenge.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/challenge.go b/src/challenge.go index a1f9893..38cffee 100644 --- a/src/challenge.go +++ b/src/challenge.go @@ -4,6 +4,8 @@ type Challenge struct { Name string Description string Flag string // this should never leave the server + FoundFlag bool + FlagTries uint Container string // this could, but is not required as well Category string } @@ -12,6 +14,7 @@ type StrippedChallenge struct { Name string `json:"name"` Description string `json:"description"` Category string `json:"category"` + FoundFlag bool `json:"foundFlag"` } func stripChallenge(c Challenge) (StrippedChallenge) { @@ -19,5 +22,6 @@ func stripChallenge(c Challenge) (StrippedChallenge) { Name: c.Name, Description: c.Description, Category: c.Category, + FoundFlag: c.FoundFlag, } } |