Skip to content

Commit 0314282

Browse files
committed
dashboard: docs (fixes #2)
1 parent 05cfe32 commit 0314282

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

dashboard/README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Dashboard
2+
=========
3+
4+
The dashboard is the website that runs the CTF. It lets users log in, discover the active services, check the services’ status, and submit flags. And, of course, check out the rankings :)
5+
6+
7+
Structure
8+
---------
9+
The dashboard is designed to withstand a heavy load (hackers are F5-machines), without overloading the rest of the CTF infrastructure. This is why the web server, ```web.rb```, is short and nible, and exclusively talks to a Redis cache. The cache is populated by ```worker.rb```, which fetches updates from the central database every second.
10+
11+
You can start everything as a service (```start dashboard```), or manually with ```forman start```.
12+
13+
14+
API
15+
---
16+
17+
All the data shown on the website pages is pulled from a JSON API, so that hackers can easily use it in scripts.
18+
It’s as simple as
19+
```
20+
curl -u <TEAM_NAME>:<PASSWORD> http://<DOMAIN>/scores
21+
```
22+
### Endpoints
23+
24+
* ```/services```: list the services names, their description, and the flag ids.
25+
* ```/services_status```: shows if services are up or down
26+
* ```/scores```: gives the current rankings
27+
* ```/flag```: use this to submit a stolen flag. POST a ```{flag: <FLAG>}``` JSON hash

0 commit comments

Comments
 (0)