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