⛳ alerts for any ctfd instance via ntfy

docs: huge readme improvement

dunkirk.sh 7704c9f3 aee49cea

verified
+56 -2
.github/images/out.gif

This is a binary file and will not be displayed.

+25 -2
README.md
··· 2 2 3 3 Sends alerts for any arbitrary [CTFd](https://ctfd.io/) instance via [ntfy](https://ntfy.sh/) 4 4 5 + ![vhs gif of the command being run](https://raw.githubusercontent.com/taciturnaxolotl/carriage/main/.github/images/out.gif) 6 + 5 7 ## Install 6 8 7 9 You can download a pre-built binary from the releases or you can use the following options ··· 12 14 # Go 13 15 go install github.com/taciturnaxolotl/ctfd-alerts@latest 14 16 ``` 17 + 18 + If you need a systemd service file there is one in `ctfd-alerts.service` 15 19 16 20 ### Nix 17 21 ··· 25 29 ```nix 26 30 # In your flake.nix 27 31 { 28 - inputs.akami.url = "github:taciturnaxolotl/ctfd-alerts"; 32 + inputs.ctfd-alerts.url = "github:taciturnaxolotl/ctfd-alerts"; 29 33 30 - outputs = { self, nixpkgs, akami, ... }: { 34 + outputs = { self, nixpkgs, ctfd-alerts, ... }: { 31 35 # Access the package as: 32 36 # ctfd-alerts.packages.${system}.default 33 37 }; 34 38 } 39 + ``` 40 + 41 + ## Config 42 + 43 + The config for the bot is quite simple. Create a `config.toml` file in the same directory as the binary (or link to the config location with `-c ./path/to/config/config.toml`) with the following format: 44 + 45 + ```toml 46 + debug = true 47 + interval = 100 # defaults to 300 if unset 48 + user = "echo_kieran" 49 + 50 + [ctfd] 51 + api_base = "http://163.11.237.79/api/v1" 52 + api_key = "ctfd_10698fd44950bf7556bc3f5e1012832dae5bddcffb1fe82191d8dd3be3641393" 53 + 54 + [ntfy] 55 + api_base = "https://ntfy.sh/" 56 + acess_token = "" 57 + topic = "youralert" 35 58 ``` 36 59 37 60 Written in go. If you have any suggestions or issues feel free to open an issue on my [tangled](https://tangled.sh/@dunkirk.sh/ctfd-alerts) knot
+15
cassette.tape
··· 1 + Output .github/images/out.gif 2 + Set Shell zsh 3 + Set Width 1400 4 + Set Height 900 5 + Require ctfd-alerts-dev 6 + Sleep 1s 7 + Type "ctfd-alerts-dev" 8 + Enter 9 + Sleep 3s 10 + Type "ctfd-alerts-dev status" 11 + Enter 12 + Sleep 4s 13 + Type "ctfd-alerts-dev serve" 14 + Enter 15 + Sleep 5s
+16
ctfd-alerts.service
··· 1 + [Unit] 2 + Description=ctfd alerts server 3 + After=network.target 4 + 5 + 6 + [Service] 7 + ExecStart=/home/pi/go/bin/ctfd-alerts serve 8 + Restart=always 9 + User=pi 10 + WorkingDirectory=/home/pi/ctfd-alerts 11 + StandardOutput=journal 12 + StandardError=journal 13 + LimitNOFILE=65536 14 + 15 + [Install] 16 + WantedBy=multi-user.target