Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/player_zshrc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions levels/game-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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']
23 changes: 19 additions & 4 deletions levels/pages/clone.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.
Expand All @@ -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

Expand All @@ -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:
Expand All @@ -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")

Expand All @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion levels/pages/log-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 2 additions & 0 deletions levels/pages/log-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 6 additions & 0 deletions levels/pages/merge-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 %}}
6 changes: 5 additions & 1 deletion levels/pages/merge-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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 %}}
4 changes: 4 additions & 0 deletions levels/pages/merge-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}}
6 changes: 4 additions & 2 deletions levels/pages/revert-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}}
8 changes: 7 additions & 1 deletion levels/pages/start-here.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down Expand Up @@ -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 <the flag you've got>`.
{{% /expand %}}
2 changes: 2 additions & 0 deletions levels/pages/tag-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion scripts/src/bin/templates/graph.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down