-4
$\begingroup$

I got this link from a friend of mine, it's supposed to be really hard to understand.

Could you help me get the hidden text?

enter image description here

Source

$\endgroup$

2 Answers 2

5
$\begingroup$

The linked page contains a segment of javascript code. With some line spacing to make it somewhat more readable, it looks like this:

function r(){for(var r=0,e=0,a="",l=0;l<n.length;l++)if(n[l].toLowerCase()!=n[l]&&(r+=1),8==++e){if(!t)return;a+=String.fromCharCode(r),r=0,e=0}else r<<=1;return a}

var e=!1,t=!1,

a=setInterval(function(){e&&(t=!0,alert("Your flag is: "+r()),clearInterval(a));t=!1},1e3),

n="hHBudYDbtLYvFIkftFJmpkrXtKImhMNCiULIJqZOnEbhifbSiEusXMetaRGsTJrlrAaTQWZRnNLZQjmKmcSPlnywnJHVuLsSyIqInmCetDyRYXPSpiXHxUXwzVTpqhqZazKsnYiygXyioSfXjIzAUTYZpSyllknszSQMlzQnrgVIycFObAjKSZZFgDNyecIliWNqcDzAbFujFZrmdFMoTGKHsMNfAQSoqOBocHCCtEcRHZHOtOAPgJqiwbSIlfyivGaWSZBIbLaMlKdIoYgJhgTYyXVNEQfB";

This code does not do anything in this form, so it needed some tweaking:

In the function inside the setInterval(...), the popup message won't appear because the variables e and t are false. You can change this by editing the line
var e=!1,t=!1,
into
var e=1,t=1,

The resulting popup message appears with this text:

Your flag is: flag{ALl_y0uR_6a$E_@r3_beLong_t0_US}

$\endgroup$
1
  • $\begingroup$ @shays Was this popup message the expect result, or is there more to the puzzle? $\endgroup$
    – MikeQ
    Jun 20, 2017 at 22:07
2
$\begingroup$

When you inspect the source page, there is a little script:

function r(){for(var r=0,e=0,a="",l=0;l<n.length;>l++)if(n[l].toLowerCase()!=n[l]&&(r+=1),8==++e){if(!t)return;a+=String.fromCharCode(r),r=0,e=0}else r<<=1;return a}var e=!1,t=!1,a=setInterval(function(){e&&(t=!0,alert("Your flag is: "+r()),clearInterval(a));t=!1},1e3),n="hHBudYDbtLYvFIkftFJmpkrXtKImhMNCiULIJqZOnEbhifbSiEusXMetaRGsTJrlrAaTQWZRnNLZQjmKmcSPlnywnJHVuLsSyIqInmCetDyRYXPSpiXHxUXwzVTpqhqZazKsnYiygXyioSfXjIzAUTYZpSyllknszSQMlzQnrgVIycFObAjKSZZFgDNyecIliWNqcDzAbFujFZrmdFMoTGKHsMNfAQSoqOBocHCCtEcRHZHOtOAPgJqiwbSIlfyivGaWSZBIbLaMlKdIoYgJhgTYyXVNEQfB";

It seems to be like a simple Javascript CTF game.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.