Planet DesKel

DesKel's official page for CTF write-up, Electronic tutorial, review and etc.

2 September 2020

Webhacking.kr write-up: old-14

Link point tag
old-14 100 JavaScript

Welcome back to another webhacking.kr CTF writeup. As for today’s challenge, we are going to solve another JS.

question

Well, nothing interesting on the front page. How about the source code?

code

That’s it, the JS code lead us to the solution. We have to find the value of ul. As you can see, the index starts at .kr from the URL of the challenge.

https://webhacking.kr/challenge/js-1/

Which mean the indexed characters are kr/challenge/js-1/. It contains 18 characters. Hence the final ul value is 18*30 = 540. Submit the value and complete the challenge.

solve

Alternatively, try putting the code on JS compiler and change the ul variable before running it.

var ul="https://webhacking.kr/challenge/js-1/";
ul=ul.indexOf(".kr");
ul=ul*30;
console.log(ul);
tags: webhacking.kr - javascript

Thanks for reading. Follow my twitter for latest update

If you like this post, consider a small donation. Much appreciated. :)


Vortex


© 2020 DesKel