Level 2

Level 2

July 27, 2022
1 min read
level-2

Level 2

Solvers
s sahuang ,
Points
25
Flag
CTF{capt41n-h00k!}

Lets script it - don’t forget the order!

“Lets script it”? I’ve already scripted throughout the entirety of Level 1 to accommodate for future levels! Let’s add a Level 2 button to our scalable, future-proof code 😉:

solve.js
const passwords = [{
level: 1,
password: ""
},
{
level: 2,
password: "CTF{CapTA1n-cRUCh}"
}
];
index.html
<fieldset>
<p>Start Level:</p>
<div>
<button id="lvl0">Level 1</button>
<button id="lvl1">Level 2</button>
</div>

This is what appears when clicking the button:

Level 2

Looks like we’ll have to add two more steer buttons:

index.html
<p>Steer Ships:</p>
<div>
<button id="steer0">Steer 0</button>
<button id="steer1">Steer 1</button>
<button id="steer2">Steer 2</button>
</div>
</fieldset>

It seems as though that you also need the ships to enter in a specific order. It will be difficult to multitask all three, but it’s doable! Let’s try to solve it (also very sped up):

Flag 2

Terminal window
...
ID: 0 | (789, 105) (849, 294) | DIR: UP
ID: 1 | (796, 105) (856, 373) | DIR: UP
ID: 2 | (691, 108) (751, 389) | DIR: UP
{"type":"WIN","flag":"CTF{capt41n-h00k!}"}

Although we’ve solved level 2 manually, I have a gut feeling the next few ones won’t be as trivial…