From 83537a94d26509be51e4458e6c9c09df5970de93 Mon Sep 17 00:00:00 2001 From: maride Date: Tue, 14 Aug 2018 23:24:40 +0200 Subject: Add submit functionality for flags, and keep track of wrong tries --- src/seed.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/seed.go') 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 } -- cgit 1.4.1