diff options
author | Emile <hanemile@protonmail.com> | 2019-10-20 01:31:36 +0200 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-10-20 01:31:36 +0200 |
commit | b0725fa015ceeb002b8ec99655b8666db9f5b8ad (patch) | |
tree | 9fc3c746cf4136e7e4267b4500825c697ace38e1 /README.md | |
parent | f7cdb3a36e8cd29456f6370b10b0139166ad2a03 (diff) |
basic api description
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/README.md b/README.md index 5a35067..c9c5d4b 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,41 @@ In order to not transfer the flag over a possibly insecure connection, the sha256 sum of the flag is transmitted. The companion containers can verify the flag by hashing it (sha256), comparing the hashes and so defining if a challenge is solved or not. + +## api + +The manager exposes the challenges for the companion containers to use. The +endpoint for this is `/api/getChallenges` returning some json in the following +form: + +```json +{ + "categories": { + "guess": 1, + "misc": 2, + "pwn": 1 + }, + "challenges": [ + { + "name": "random challenge name", + "description": "some bad description", + "flaghash": "6a1e963371a64b32aff302ef7f3a7d6df8df903fce10f3db6ee918f18ac11f2a", + "container": "container-randomchallenge", + "category": "guess", + "points": 100, + "static": false + }, + { + "name": "challenge 3", + "description": "This is a rather long description describing how the challenge works, what might be helpful and other boring stuff...", + "flaghash": "f87f2dc623bb1896707c68532993e434e3484c2316629814e8919dfeb5993a0a", + "container": "container-challengethree", + "category": "misc", + "points": 300, + "static": true + }, + ... + ] +} + +``` |