#!/bin/bash
export PATH=/root/.local/bin:$PATH
cd /root/pcruns/ng_lab2_grok45
for i in 1 2 3 4 5 6 7 8; do
  if [ $i -eq 1 ]; then
    pentestcode run -i --dir /root/pcruns/ng_lab2_grok45 -m openrouter/x-ai/grok-4.5 --auto --title "ng-lab2-grok45-ptc" "$(cat /root/pcruns/prompt_ng2.txt)" 2>&1 | tee -a run.log
  else
    echo "=== KEEPALIVE RESTART $i ===" >> run.log
    pentestcode run -i --dir /root/pcruns/ng_lab2_grok45 -m openrouter/x-ai/grok-4.5 --auto -c "Continue the engagement. Keep going until all 5 objectives are proven." 2>&1 | tee -a run.log
  fi
  sleep 5
done
