Skip to content

Commit

Permalink
Update practice
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorNelson authored Oct 4, 2024
1 parent c1005fd commit 68da4a3
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions welcome/practice/solve
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ cat <<END | while read LINE; do echo "$LINE"; sleep 0.1; done
⠀⠀⠀⠀⠀⠀⠻⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
END

if [ -e /run/dojo/var/root/privileged ]
then
cat <<END
if [ "$(cat /run/dojo/sys/workspace/privileged)" -eq "1" ]; then
cat <<END
You are running in practice mode! The secret you need is in /challenge/secret.
Use sudo to become root and read it out, then restart this challenge in non-
Practice mode to get the flag!
Expand All @@ -32,22 +31,22 @@ You'll notice that /flag has been replaced with a Practice-specific flag, so
you can't just solve read out challenge flags in Practice mode.
END
else
cat <<END
cat <<END
You are not running in Practice mode! Hopefully, you have already run this
challenge in Practice mode and used sudo to read /challenge/secret. If not,
restart this challenge in Practice mode and do so, then come back to real
mode to try this again.
END
echo -n "ENTER SECRET: "
read TOKEN
read CORRECT < /challenge/secret
echo -n "ENTER SECRET: "
read TOKEN
read CORRECT < /challenge/secret

if [ "$TOKEN" == "$CORRECT" ]
then
echo -n "CORRECT! Your flag: "
cat /flag
else
echo "Incorrect..."
fi
if [ "$TOKEN" == "$CORRECT" ]
then
echo -n "CORRECT! Your flag: "
cat /flag
else
echo "Incorrect..."
fi
fi

0 comments on commit 68da4a3

Please sign in to comment.