kapravel / hackpack-web

3 stars 5 forks source link

Add flag_format to challenge cards #43

Closed napkinbrown closed 3 years ago

napkinbrown commented 3 years ago

A lot of the challenges we're pulling have their own flag formats. Add a field to allow challenge curators to note the challenge's flag format.

Modified from https://github.com/kapravel/hackpack-web/blob/master/challenge_files/README.md

challenge_id: # Must be unique
  title: My l33t Challenge
  about: |
      Challenge descriptions don't support Markdown (yet) <br>
      But <code>HTML/Bootstrap</code> formatting works. <br>
      https://getbootstrap.com/docs/5.0/content/reboot/
  connect: nc somehost 8080
  file_path: /challenge_files/you_need_this_to_solve.zip
  flag_format: hackpack{...} ##### NEW #####
  flag_MD5: 18c11cef1dc29a707b38db4bfc1ca5a5 # Used to make the flag checker work. Make sure this is accurate!

Update challenge_card.html to use the flag_format as the placeholder text for the flag checker. If flag_format isn't specified, it should use flag{...} or hackpack{...} as the placeholder text