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/seed.go | |
parent | 00c520f9653a72314a2e9ac2311e68421281688f (diff) |
Add submit functionality for flags, and keep track of wrong tries
Diffstat (limited to 'src/seed.go')
-rw-r--r-- | src/seed.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/seed.go b/src/seed.go index 8256929..fde4265 100644 --- a/src/seed.go +++ b/src/seed.go @@ -52,6 +52,8 @@ func readSeedFile(path string) ([]Challenge) { Name: name, Description: desc, Flag: flag, + FoundFlag: false, + FlagTries: 0, Container: cont, Category: category, }) @@ -81,6 +83,8 @@ func generateJSONFromChallenges() (string, error) { strippedChallenges = append(strippedChallenges, stripChallenge(challenge)) } - marshalled, marshalError := json.Marshal(strippedChallenges) + marshalled, marshalError := json.Marshal(map[string][]StrippedChallenge{ + "challenges": strippedChallenges, + }) return string(marshalled), marshalError } |