diff --git a/welcome/module.yml b/welcome/module.yml index f518227..ca50090 100644 --- a/welcome/module.yml +++ b/welcome/module.yml @@ -10,6 +10,9 @@ challenges: - id: desktop-paste name: Pasting into the Desktop allow_privileged: false + - id: restart + name: Restarting Challenges + allow_privileged: false - id: challenge name: Challenge Programs allow_privileged: false diff --git a/welcome/restart/.bashrc b/welcome/restart/.bashrc new file mode 100644 index 0000000..7dea54e --- /dev/null +++ b/welcome/restart/.bashrc @@ -0,0 +1 @@ +/challenge/solve diff --git a/welcome/restart/DESCRIPTION.md b/welcome/restart/DESCRIPTION.md new file mode 100644 index 0000000..5797b30 --- /dev/null +++ b/welcome/restart/DESCRIPTION.md @@ -0,0 +1,11 @@ +Hacking is a contact sport. +There will be times when your attempts to hack through a level will result in irreparable damage to the workspace environment. +When this happens, don't panic, you can just restart the challenge! + +This level will guide you through this concept. +On your first attempt, it will ask you for a password that you don't yet know. +When you get this password wrong, it will tell you what the right one is, but will then destroy the challenge and the flag file. +You'll need to restart the challenge (go back to this page and click the Start button below!) to try again. + +Just start the terminal to give it a go. +Good luck! diff --git a/welcome/restart/solve b/welcome/restart/solve new file mode 100755 index 0000000..5111534 --- /dev/null +++ b/welcome/restart/solve @@ -0,0 +1,57 @@ +#!/opt/pwn.college/bash + +# art from https://emojicombos.com/karate-ascii-art +cat < " + +if [ "$REPLY" == "$PASSWORD" ] +then + echo "CORRECT! Here is your flag:" + cat /flag +else + echo "INCORRECT! The right password is '$PASSWORD'." + echo "This challenge will now self-destruct." + echo "Restart it to try again." + rm /flag + rm -rf /challenge +fi