Distribute and handle challenge.json
This commit is contained in:
parent
e8f6a03cd9
commit
dff4f4eb63
20 changed files with 167 additions and 48 deletions
|
@ -20,7 +20,7 @@ type ChallengeZQDS struct {
|
|||
type SessionZQDS struct {
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Scenario string `json:"scenario"`
|
||||
Scenario string `json:"scenario,omitempty"`
|
||||
YourMission string `json:"your_mission"`
|
||||
Rules string `json:"rules"`
|
||||
Start time.Time `json:"start"`
|
||||
|
@ -28,7 +28,7 @@ type SessionZQDS struct {
|
|||
Challenges []*ChallengeZQDS `json:"challenges"`
|
||||
}
|
||||
|
||||
func GenZQDSSessionFile(s *settings.Settings) (*SessionZQDS, error) {
|
||||
func GenZQDSSessionFile(c *settings.ChallengeInfo, s *settings.Settings) (*SessionZQDS, error) {
|
||||
themes, err := GetThemes()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -58,11 +58,10 @@ func GenZQDSSessionFile(s *settings.Settings) (*SessionZQDS, error) {
|
|||
}
|
||||
|
||||
return &SessionZQDS{
|
||||
Name: "Challenge Forensic",
|
||||
Description: "",
|
||||
Scenario: "",
|
||||
YourMission: "",
|
||||
Rules: "",
|
||||
Name: c.Title,
|
||||
Description: c.Description,
|
||||
Rules: c.Rules,
|
||||
YourMission: c.YourMission,
|
||||
Start: s.Start,
|
||||
End: s.End,
|
||||
Challenges: challenges,
|
||||
|
|
Reference in a new issue