#!/bin/bash set -e FLAG_FILE="${HOME}/flag.txt" echo "Uh-oh, this is an RCE!" if [ -f "$FLAG_FILE" ]; then # Reveal the flag by copying it to a world-readable temp file and printing (umask 077; cat "$FLAG_FILE" > /tmp/flag.txt) echo "Flag: $(cat "$FLAG_FILE")" else echo "Flag not found at $FLAG_FILE" >&2 fi