⛳ alerts for any ctfd instance via ntfy

docs: huge readme improvement

dunkirk.sh 7704c9f3 aee49cea

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

This is a binary file and will not be displayed.

+25 -2
README.md
···
Sends alerts for any arbitrary [CTFd](https://ctfd.io/) instance via [ntfy](https://ntfy.sh/)
+
![vhs gif of the command being run](https://raw.githubusercontent.com/taciturnaxolotl/carriage/main/.github/images/out.gif)
+
## Install
You can download a pre-built binary from the releases or you can use the following options
···
# Go
go install github.com/taciturnaxolotl/ctfd-alerts@latest
```
+
+
If you need a systemd service file there is one in `ctfd-alerts.service`
### Nix
···
```nix
# In your flake.nix
{
-
inputs.akami.url = "github:taciturnaxolotl/ctfd-alerts";
+
inputs.ctfd-alerts.url = "github:taciturnaxolotl/ctfd-alerts";
-
outputs = { self, nixpkgs, akami, ... }: {
+
outputs = { self, nixpkgs, ctfd-alerts, ... }: {
# Access the package as:
# ctfd-alerts.packages.${system}.default
};
}
+
```
+
+
## Config
+
+
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:
+
+
```toml
+
debug = true
+
interval = 100 # defaults to 300 if unset
+
user = "echo_kieran"
+
+
[ctfd]
+
api_base = "http://163.11.237.79/api/v1"
+
api_key = "ctfd_10698fd44950bf7556bc3f5e1012832dae5bddcffb1fe82191d8dd3be3641393"
+
+
[ntfy]
+
api_base = "https://ntfy.sh/"
+
acess_token = ""
+
topic = "youralert"
```
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
···
+
Output .github/images/out.gif
+
Set Shell zsh
+
Set Width 1400
+
Set Height 900
+
Require ctfd-alerts-dev
+
Sleep 1s
+
Type "ctfd-alerts-dev"
+
Enter
+
Sleep 3s
+
Type "ctfd-alerts-dev status"
+
Enter
+
Sleep 4s
+
Type "ctfd-alerts-dev serve"
+
Enter
+
Sleep 5s
+16
ctfd-alerts.service
···
+
[Unit]
+
Description=ctfd alerts server
+
After=network.target
+
+
+
[Service]
+
ExecStart=/home/pi/go/bin/ctfd-alerts serve
+
Restart=always
+
User=pi
+
WorkingDirectory=/home/pi/ctfd-alerts
+
StandardOutput=journal
+
StandardError=journal
+
LimitNOFILE=65536
+
+
[Install]
+
WantedBy=multi-user.target