Files
felhom.eu/documentation/audits/signup-lock-2026-09-29/B/wd.sh
T

7 lines
895 B
Bash

D=enkisfelhom.hu; DBH=$(grep -o 'SUBDOMAIN_DB: [a-z0-9-]*' /opt/docker/stacks/wanderer/app.yaml | awk '{print $2}')
echo "db host: $DBH.$D"
echo "PocketBase admin UI /_/ (via traefik, stranger) -> $(curl -sk -o /tmp/w1 -w '%{http_code}' -H "Host: $DBH.$D" https://127.0.0.1/_/) $(grep -oiE 'superuser|installer|pbinstal[a-z]*' /tmp/w1 | sort -u | tr '\n' ' ')"
echo "PB superusers count (API, stranger) -> $(curl -sk -H "Host: $DBH.$D" https://127.0.0.1/api/collections/_superusers/records | head -c 120)"
echo "stranger creates a wanderer user straight through PocketBase (via traefik) -> $(curl -sk -o /tmp/w2 -w '%{http_code}' -H "Host: $DBH.$D" -H 'Content-Type: application/json' -X POST -d '{"username":"strngrpb","email":"spb@x.hu","password":"Xx12345678z9","passwordConfirm":"Xx12345678z9"}' https://127.0.0.1/api/collections/users/records) $(head -c 140 /tmp/w2)"
rm -f /tmp/w1 /tmp/w2