Files
ctf/2026/cscg/web/innovation-at-work/run.sh
2026-04-10 03:31:12 +02:00

18 lines
461 B
Bash
Executable File

#!/bin/sh
example_hash="$(echo example | shasum -a 256 | cut -d' ' -f 1)"
echo '{ "name: "Max Mustermann", "age": 10 }' > /db/$example_hash:$example_hash
flag_hash="$(echo flag | shasum -a 256 | cut -d' ' -f 1)"
password_hash="$(head -n 32 /dev/random | shasum -a 256 | cut -d' ' -f 1)"
echo 'dach2026{fake_flag}' > /db/$flag_hash:$password_hash
chmod -R a+rwx /db
unset example_hash
unset password_hash
unset flag_hash
exec lighttpd -f /lighttpd.conf -D