Custom scoreboard for your picoCTF classroom.
PicoCTF does not have scoreboards for classrooms. This is a simple web app that fetches the data using the picoCTF API and displays it in a user-friendly way.
It is mainly intended for teachers who want to display the scoreboard on a projector during a session.
Clone the repository:
$ git clone https://github.com/samu-delucas/picoctf-scoreboard.git
Edit the config.py
file with your own settings:
# Your classroom ID (int)
# You can find this by going to the classroom page and looking at the URL
# i.e. https://play.picoctf.org/classroom/<your-classroom-id>
CLASSROOM_ID = 0
# Your picotf cookies
# These can be found in your browser's developer tools
COOKIES = {
'sessionid': 'your-session-id',
'csrftoken': 'your-csrf-token',
# 'cf_clearance': '',
# '__cf_bm': '',
}
Finally, run the app:
Docker
$ cd picoctf-scoreboard
$ docker build -t picoctf-scoreboard .
$ docker run picoctf-scoreboard
Manual
$ cd picoctf-scoreboard
$ pip install -r requirements.txt
$ flask --app scoreboard run
To delete the saved data and start over, delete the scoreboard.json
file.
- The app will only work if you have the necessary permissions to access the picoCTF API.
- The Dockerfile runs a development server, which is not suitable for production.
- If you get
Internal Server Error
, it might be because thechallenges.json
file is outdated. Delete it and try again.
- URL parameters:
?refresh=n
will refresh the scoreboard everyn
seconds.?demo
will display a demo scoreboard with random data.
- Graph:
- Click + Drag: zoom in.
- Mouse wheel: zoom in/out.
- Hover legend: highlight the line of the hovered player.
- Click legend: hide/show the line of the clicked player.
- Refresh scoreboard without refreshing the page (AJAX)
- Double-click on graph to reset zoom
This project is available under the MIT license.