18 lines
651 B
Bash
18 lines
651 B
Bash
#!/bin/bash
|
|
COOKIE_JAR=/tmp/v94_c3.txt
|
|
rm -f $COOKIE_JAR
|
|
USER=yacine
|
|
PASS=$(python3 -c "import json;print(json.load(open('/var/www/html/api/weval-passwords.json'))['yacine']['password'])")
|
|
|
|
curl -s -c $COOKIE_JAR -X POST "https://weval-consulting.com/api/weval-auth-session.php" \
|
|
-d "action=login&user=$USER&pass=$PASS" > /dev/null
|
|
|
|
echo "Test /auth/check (what nginx calls)..."
|
|
curl -s -b $COOKIE_JAR "https://weval-consulting.com/auth/check" -w "code=%{http_code}\n" --max-time 5
|
|
echo ""
|
|
|
|
# Find /auth location in nginx
|
|
grep -n "location.*auth.check\|@auth\|@weval_login" /etc/nginx/sites-enabled/weval-consulting | head -10
|
|
|
|
rm -f $COOKIE_JAR
|