#!/usr/bin/env bash # Read-only: does the uploaded gitcat binary show up as a Go candidate? set -uo pipefail ENTRY="${1:-ipdduiyy}" BASE="http://127.0.0.1:8888/$ENTRY" PASS=$(awk -F': ' '/^password:/{print $2}' /www/server/panel/data/initial_password.txt) curl -s -c /tmp/ck.txt -H 'Content-Type: application/json' -H 'Origin: http://127.0.0.1:8888' \ -d "{\"username\":\"admin\",\"password\":\"$PASS\"}" "$BASE/api/v1/auth/login" >/dev/null echo "== candidates in /go ==" curl -s -b /tmp/ck.txt "$BASE/api/v1/sites/executables?dir=%2Fgo" echo echo "== file mode ==" stat -c '%a %U:%G %s %n' /www/wwwroot/go/* 2>/dev/null