Skip to main content

Local scoreboard and bot to track the President's Cup.

Project description

President's CTF Bot

A local scoreboard and bot to track the President's Cybersecurity Cup.

Quick Start

pip install presidentsCTF-bot
wget https://gitlab.com/royragsdale/presidentsctf-bot/raw/master/config.json
presidentsCTF
  1. Install the tool.
  2. Get a baseline configuration with the existing events.
  3. Fetch the scoreboards.

By default this will fetch all the events from the configuration and show any active teams on the scoreboard. If there are no active events you will not be shown anything.

Consult the --help for the full set of options as well as the Examples section below.

Features

  • Track solves over time.
  • Locally annotate known teams.
  • Highlight active teams.
  • Send updates to slack or twitter.

Background

The scoreboard data for each event (e.g. Team Round 1) is publicly available. This tool merely fetches the json data and does some local processing to provide a better experience.

Examples

Just One Event

Often you only want to display the current event.

You can use a configuration file (e.g. config.json or with --config) that only specifies that event.

presidentsCTF --config solo-round-1.json

Or you can use the --event option to limit the display (6e8a18 is the prefix of the Solo Round 1 leaderboard event_id).

presidentsCTF --event 6e8a18

More Teams

By default the scoreboard only shows active teams. If the event is not live there will be no results. The following flags change what is shown. These can be used in combination.

--active         show active teams (default=True)
--known          show known teams (default=False)
--top TOP        show top N teams
$ presidentsCTF --event 6e8a18 --top 3
##############################################################
Solo Round 1
##############################################################
|   Rank | Team           |   Score |   Solves | Remaining   |
|--------|----------------|---------|----------|-------------|
|      1 | DOD-Player-513 |    5500 |        9 | Final       |
|      2 | DOD-Player-280 |    5500 |        9 | Final       |
|      3 | DOD-Player-262 |    5500 |       10 | Final       |

Log solves

By running the fetch in a recurring fashion the tool can compute differences and infer challenge solves. This is easy to automate with a tool like watch. For example the following invocation will capture minute by minute updates as well as export the received json data for other use, and store the update messages to log.

$ watch -n 60 'presidentsCTF --event 6e8a18 --export | tee -a log'

Known Teams

By default the scoreboard only shows anonymous team names. This makes it challenging to follow your friends and enemies. If you know who a team is you can add a custom mapping into your config.json under the "teams" section.

Notifications

If you want the updates delivered live in real time, this tool can also post updates to slack or twitter. Check the example config.json for the information required to use this functionality.

The "watch" field of the "slack" configuration maps a team name to a slack user id. This will @mention the user for any changes on that team.

Caution using the known teams feature with the notification feature so as not to unintentionally expose who is on what team.

Though the bot has twitter functionality, you should probably just follow the unofficial account https://twitter.com/presidentsCTF.

Thanks

The President's Cup Cybersecurity Competition organizers for putting on the event. jchristman for pointing out that api endpoint. All bugs are mine.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

presidentsCTF-bot-0.0.4.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

presidentsCTF_bot-0.0.4-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file presidentsCTF-bot-0.0.4.tar.gz.

File metadata

  • Download URL: presidentsCTF-bot-0.0.4.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for presidentsCTF-bot-0.0.4.tar.gz
Algorithm Hash digest
SHA256 319a22611a375aebc1d2d461cf3812a90cdf6b88fb00923a8b577328f49ba07c
MD5 b648c14d17ab40a006824f6cc72b0c10
BLAKE2b-256 43c772224e7187214d2079f25e6e0f92a950d2fc02d76fac61249f61f54d6269

See more details on using hashes here.

File details

Details for the file presidentsCTF_bot-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: presidentsCTF_bot-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for presidentsCTF_bot-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b4e86f2e2dd1079650995f1f6fc730ddd3992398b141494ee930587f3975a52b
MD5 77cc5a942c78c521c6578d9d58c8e347
BLAKE2b-256 f4605e11f55d1519d2fc31f33de250bfe6b2379b31393a7117022ac87ca1c7e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page