refractor blogpost and cdn chall

This commit is contained in:
Jonathan committed 2025-10-10 22:37:11 +07:00
1 parent 2d51b73a1e
commit bb3f6e74aa
47 files changed
-544

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -e
FLAG_SHA=$(head -c 64 /dev/urandom | sha256sum | awk '{print $1}')
FLAG="GEMASTIK{${FLAG_SHA}}"
echo "$FLAG" > /app/flag.txt
chmod 400 /app/flag.txt
mkdir -p /app/uploads
mkdir -p /data
DBFILE=/data/app.db
if [ ! -f "$DBFILE" ]; then
echo "Initializing database..."
sqlite3 $DBFILE < /app/init_db.sql
fi
echo "Starting Flask app (port 8000)..."
export FLASK_APP=/app/app.py
export FLASK_ENV=production
python /app/app.py