Skip to content

CTF Scoreboard Fetching

Thomas Gerot edited this page Mar 29, 2017 · 1 revision

The getscores tool automates the task of downloading and formatting CTF final scoreboard results from CTFtime scoreboards in order to attach local versions of the scoreboards with each CTF in the write-ups repositories.

Requirements:

  • Git
  • Python
    • BeautifulSoup

Here is an example of a CTFtime event scoreboard for the Boston Key Party CTF 2017 (at bottom of page): https://ctftime.org/event/394. Notice the URL is formatted as /event/394, where each event on CTFTime is assigned its own numerical ID.

CTFtime Scoreboard

Important: Not every CTF's scoreboard makes it onto CTFtime.

To add a scoreboard to your CTF write-ups directory, browse this page for the competition, then select the competition's year. If a scoreboard is not present at the bottom of the page, this tool will not of use to you. Otherwise, clone the repository to your machine using the command git clone https://github.com/ctfs/write-ups-tools. Then navigate into the cloned repository's directory with cd write-ups-tools. For best results, run the script and pipe its output to a file called scoreboard (no file extension). To do this, type python getscores.py https://ctftime.org/event/394 > scoreboard where the URL refers to your specific competition (must have a scoreboard on the page).

This will generate a file called scoreboard which will have a preformatted table of the scoreboard contents. Place this file in the root of your CTF's write-ups directory and link to it as the local copy of the scoreboard from your CTF's main README.md.

If you don't have BeautifulSoup installed: https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-beautiful-soup

Clone this wiki locally