Skip to content

TJCSec/rctf-bloodwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rctf-bloodwatch

rctf-bloodwatch from redpwn but in Python. The only additional feature is selecting specific divisions to count (to exclude admins, for example).

Usage

argument environment required default type description
-u / --url RCTF_URL yes (none) string rCTF URL to monitor
-t / --token RCTF_TOKEN yes (none) string rCTF API token
-d / --division RCTF_DIVISION no all divisions string rCTF division(s) to include
-w / --discord-webhook DISCORD_WEBHOOK yes (none) string Discord webhook URL
-m / --message BLOOD_MESSAGE yes (none) string Message to send to webhook
-i / --interval BLOOD_INTERVAL no 60 integer Seconds between checks
-l / --log-level LOG_LEVEL no INFO NOTSET | DEBUG | INFO | WARNING | ERROR | CRITICAL Log level

Divisions

--division can be specified multiple times to include multiple divisions. Alternatively, specify a space-separated list in RCTF_DIVISION.

Message

--message is a template string with these variables available:

  • challenge (challenge object)
  • blooder (solve object)

See rCTF for the shape of these objects. Here's an example message:

Congratulations to [`{{ blooder.userName | replace("`", "") }}`](<https://ctf.tjcsec.club/profile/{{ blooder.userId }}>) for first blood on `{{ challenge.name }}`!

This sends a message that looks like this:

example webhook message

Sample Usage

version: '3'
services:
  blood:
    image: ghcr.io/tjcsec/rctf-bloodwatch
    restart: always
    environment:
      - RCTF_TOKEN=sice
      - DISCORD_WEBHOOK=deets
    command: ['-u', 'http://rctf/', '-m', 'Congratulations to [`{{ blooder.userName | replace("`", "") }}`](<https://rctf/profile/{{ blooder.userId }}>) for first blood on `{{ challenge.category }}/{{ challenge.name }}`!']

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages