diff options
author | maride <maride@darknebu.la> | 2018-10-01 15:01:01 +0200 |
---|---|---|
committer | maride <maride@darknebu.la> | 2018-10-01 15:01:01 +0200 |
commit | 364a18c1f138811e1eba77be5514e458ef2e21a4 (patch) | |
tree | ec3cdaf17eaf7ec90437cb4c6f459b444c963226 /src/challenge.go | |
parent | 715fb688cf599896050bc0adcf711074fb94b73f (diff) |
Save timestamp when entering flag
Diffstat (limited to 'src/challenge.go')
-rw-r--r-- | src/challenge.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/challenge.go b/src/challenge.go index 991e4e5..f0028ca 100644 --- a/src/challenge.go +++ b/src/challenge.go @@ -1,10 +1,12 @@ package main +import "time" + type Challenge struct { Name string Description string Flag string // this should never leave the server - FoundFlag bool + FoundFlag time.Time FlagTries uint Container string // this could, but is not required as well Category string @@ -25,7 +27,7 @@ func stripChallenge(c Challenge) (StrippedChallenge) { Name: c.Name, Description: c.Description, Category: c.Category, - FoundFlag: c.FoundFlag, + FoundFlag: c.FoundFlag != time.Unix(0, 0), ContainsLaunchable: c.Container != "", IPAddress: getAddressForChallengeContainer(c.Container), } |