diff --git a/build/player_zshrc.sh b/build/player_zshrc.sh index 794d57e..bea98fd 100644 --- a/build/player_zshrc.sh +++ b/build/player_zshrc.sh @@ -7,3 +7,4 @@ source $ZSH/oh-my-zsh.sh source /usr/share/doc/fzf/examples/key-bindings.zsh source /usr/share/doc/fzf/examples/completion.zsh +alias python=python3 diff --git a/levels/game-config.toml b/levels/game-config.toml index 2badbcb..4d013a1 100644 --- a/levels/game-config.toml +++ b/levels/game-config.toml @@ -92,7 +92,7 @@ flags = ['merge-5'] title = 'merge-5' branch = 'reappraise-veratroyl-garfishes' solution_checker = 'hooks/checkers/merge-5.sh' -flags = ['merge-6'] +flags = ['merge-levels-done-you-win'] [[levels]] title = 'tag-1' @@ -130,10 +130,10 @@ flags = [ title = 'hooks-2' branch = 'cyprus-akees-metope' solution_checker = 'hooks/checkers/hooks-2.sh' -flags = ["hooks-branch-done-you-win"] +flags = ["hooks-levels-done-you-win"] [[levels]] title = 'remote-1' branch = 'geared-tidal-consolidated' solution_checker = 'hooks/checkers/remote-1.sh' -flags = ['main-branch-done-you-win'] +flags = ['main-levels-done-you-win'] diff --git a/levels/pages/clone.md b/levels/pages/clone.md index 066d4d5..764106d 100644 --- a/levels/pages/clone.md +++ b/levels/pages/clone.md @@ -19,6 +19,7 @@ Welcome to `make-git-better` CTF 🚩 - [Notes for beginners](#notes-for-beginners) - [🧱 CTF structure](#ctf-structure) + - [The level browser](#the-level-browser) - [🤔 Unsure what to do?](#unsure-what-to-do) - [▶ I am ready to play](#i-am-ready-to-play) - [Connect to the game server](#connect-to-the-game-server) @@ -33,10 +34,14 @@ This CTF, like most other CTFs, is separated into levels. You start at the "clon The pages on this website for the different levels can be accessed via the **level graph browser**: +### The level browser + - The current level is marked with a 📍. For example, you are now in the `📍 clone` level. - Click on a level to go to its page. - You can zoom in and out and drag the browser around to take a look, as well. +Try it out! + {{< levelgraph >}} Each page will contain information about that stage, and also some hints. All levels in this game have a page on this website, and they are all linked to from the level graph browser. @@ -53,7 +58,7 @@ There are several things you can try when you are unsure how to continue: ## ▶ I am ready to play -This is the first level of the challenge. The goal of this level is for you to log into the game using SSH and clone the game repository. +This is the first level of the challenge. The goal of this level is for you to log into the game server using SSH and clone the game repository. ### Connect to the game server @@ -63,8 +68,6 @@ The host to which you need to connect is `ctf.mrnice.dev`, on port `12345`. The ssh player@ctf.mrnice.dev -p 12345 ``` -The game server has some stuff installed. [See the CTF intro page for more details](../../ctf). - ### Clone the repository You need to `clone` a repository using `ssh`, as well. The server is `localhost`, the user is `gamemaster`, and the repository's path on the server is `~/ctf-repo`. So that means you need to run the following command: @@ -73,7 +76,13 @@ You need to `clone` a repository using `ssh`, as well. The server is `localhost` git clone gamemaster@localhost:~/ctf-repo ``` -Once you've done this, run `cd ctf-repo` to change the working directory to the cloned repository. You should see changes in your shell (like `master`). It should look something like this: +Once you've done this, run + +```sh +cd ctf-repo +``` + +to change the working directory to the cloned repository. You should see some changes in your shell (like `master` on the left side). It should look something like this: ![Clone level screenshot](https://i.imgur.com/3fJ51oe.png "Clone level screenshot") @@ -97,6 +106,12 @@ Click on hints to reveal them. {{% /expand %}} +{{% expand "What's on the game server" %}} + +The game server is set up with quite a lot of programs: [see the CTF intro page for more details](../../ctf#the-game-server). + +{{% /expand %}} + {{% expand "How do I read a file?" %}} Run `cat README.md`. Here's information about [cat](https://man7.org/linux/man-pages/man1/cat.1.html). diff --git a/levels/pages/log-1.md b/levels/pages/log-1.md index d5ae2c9..69eca80 100644 --- a/levels/pages/log-1.md +++ b/levels/pages/log-1.md @@ -15,7 +15,7 @@ twitter: {{< levelgraph >}} -![history](https://www.thepeoplesbulletin.com/wp-content/uploads/2018/04/learn-histpory-720x359.png "history") +![history](https://i.pinimg.com/originals/c8/ae/dd/c8aedde71dc5ade3e6ce3e4a990a5314.jpg "history") The flag is in the commit message of this branch's grandparent. diff --git a/levels/pages/log-4.md b/levels/pages/log-4.md index 8e3d160..c98358c 100644 --- a/levels/pages/log-4.md +++ b/levels/pages/log-4.md @@ -27,6 +27,8 @@ twitter: You'll have to hop around a little to find the flag. Read the `readme` to start. +rKTUAESacQM + ## 🧩 Hints Click on the hint to see it. diff --git a/levels/pages/merge-1.md b/levels/pages/merge-1.md index 02d90f2..803bb8b 100644 --- a/levels/pages/merge-1.md +++ b/levels/pages/merge-1.md @@ -19,6 +19,8 @@ There's a script called `runme.py`. Try to run it. ![staircase](https://media.giphy.com/media/6laM7KdXvzBba/giphy.gif) +Once you're done with this level, remember to push! + ## 🧩 Hints Click on hints to reveal them. @@ -33,6 +35,10 @@ See why in [this AskUbuntu thread](https://askubuntu.com/questions/320632/why-do Well, it didn't work, and raised an exception. What does the error say? {{% /expand %}} +{{% expand "I got `not something we can merge` (⊙_⊙;)" %}} +Make sure you're trying to merge something with the correct name - remember that there are remote branches and local branches, and [they are different](https://stackoverflow.com/a/16408515/4119906). +{{% /expand %}} + {{% expand "Useful commands for this level" %}} `git merge` ([documentation](https://git-scm.com/docs/git-merge) and [explanation](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging)). {{% /expand %}} diff --git a/levels/pages/merge-2.md b/levels/pages/merge-2.md index 3679998..ff45e9e 100644 --- a/levels/pages/merge-2.md +++ b/levels/pages/merge-2.md @@ -17,7 +17,7 @@ twitter: There's a script called `runme.py`. Try to run it. -*What's different this time?* +> ***What's different this time?*** ![Fast forward](https://media.giphy.com/media/xT5LMGz9PXEzZqvKmI/giphy.gif "Fast forward") @@ -35,6 +35,10 @@ Well, it didn't work, and raised an exception. What does the error say? The default editor on this machine is `vim`, but you [can change that](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_core_editor). {{% /expand %}} +{{% expand "I got `not something we can merge` (⊙_⊙;)" %}} +Make sure you're trying to merge something with the correct name - remember that there are remote branches and local branches, and [they are different](https://stackoverflow.com/a/16408515/4119906). +{{% /expand %}} + {{% expand "Useful commands for this level" %}} `git merge` ([documentation](https://git-scm.com/docs/git-merge) and [explanation](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging)). {{% /expand %}} diff --git a/levels/pages/merge-3.md b/levels/pages/merge-3.md index 1741240..ea4276a 100644 --- a/levels/pages/merge-3.md +++ b/levels/pages/merge-3.md @@ -37,6 +37,10 @@ In this case the correct form is `you're`. `git merge`, `git checkout`, `git status`. {{% /expand %}} +{{% expand "I got `not something we can merge` (⊙_⊙;)" %}} +Make sure you're trying to merge something with the correct name - remember that there are remote branches and local branches, and [they are different](https://stackoverflow.com/a/16408515/4119906). +{{% /expand %}} + {{% expand "Point me to the documentation 📚" %}} [Basic merge conflicts](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging#_basic_merge_conflicts). {{% /expand %}} diff --git a/levels/pages/revert-1.md b/levels/pages/revert-1.md index 4c6dd21..3b343e8 100644 --- a/levels/pages/revert-1.md +++ b/levels/pages/revert-1.md @@ -19,12 +19,14 @@ twitter: Try to run `runme.py`. What are you getting? -As you can see, an erroneous commit has been introduced. Undo the errors! Revert that commit (the latest one). - ## 🧩 Hints Click on the hint to see it. +{{% expand "Not sure what to do ┐('~`;)┌" %}} +As you can see, an erroneous commit has been introduced. Undo the errors! Revert that commit (the latest one). +{{% /expand %}} + {{% expand "Useful commands for this level" %}} `git log`, `git revert`. {{% /expand %}} diff --git a/levels/pages/start-here.md b/levels/pages/start-here.md index 910f745..0829b49 100644 --- a/levels/pages/start-here.md +++ b/levels/pages/start-here.md @@ -27,6 +27,8 @@ This stage is just a warm-up and it shouldn't be confusing, difficult, or requir ### What do I do with the flag +**Make sure you copy and save the flags somewhere!** + You passed this stage of the CTF, so ***check out*** the next stage 👀 ⚠ _Note:_ Don't worry if you see the following error message: @@ -36,7 +38,7 @@ You passed this stage of the CTF, so ***check out*** the next stage 👀 error: failed to push some refs to 'gamemaster@localhost:~/ctf-repo' ``` -It's on purpose. The important part is that you got the flag 🚩 Make sure you copy and save the flags somewhere! +It's on purpose. The important part is that you got the flag 🚩. ## 🧩 Hints @@ -67,3 +69,7 @@ First, return to the original commit from which you've started the challenge (`g Then, set the local `start-here` branch to the current HEAD (`git branch -f start-here`). Now you can try to solve again. {{% /expand %}} + +{{% expand "What do I do with the flag? 🚩" %}} +The flag points you to the next branch you need to checkout! `git checkout `. +{{% /expand %}} diff --git a/levels/pages/tag-2.md b/levels/pages/tag-2.md index 29b980a..9bc4aa6 100644 --- a/levels/pages/tag-2.md +++ b/levels/pages/tag-2.md @@ -17,6 +17,8 @@ twitter: ![you're it](https://media.giphy.com/media/1lwlSMzDAegXozqnLJ/giphy.gif "you're it") +> The flag is *not* `the-current-level-flag` + ## 🧩 Hints Click on the hint to see it. diff --git a/scripts/src/bin/templates/graph.tmpl b/scripts/src/bin/templates/graph.tmpl index d95ca2e..1e460b2 100644 --- a/scripts/src/bin/templates/graph.tmpl +++ b/scripts/src/bin/templates/graph.tmpl @@ -105,7 +105,7 @@ if (screen.width < 1000) \{ var final_scale = 1; } - if (screen.width < 800) \\{ + if (screen.width < 800) \{ var final_scale = 0.75; }