function connexion(){
var username = prompt("Username :", "");
var password = prompt("Password :", "");
var TheLists = ["GOD:HIDDEN"];
for (i = 0; i < TheLists.length; i++)
{
if (TheLists[i].indexOf(username) == 0)
{
var TheSplit = TheLists[i].split(":");
var TheUsername = TheSplit[0];
var ThePassword = TheSplit[1];
if (username == TheUsername && password == ThePassword)
{
alert("Vous pouvez utiliser ce mot de passe pour valider ce challenge (en majuscules) / You can use this password to validate this challenge (uppercase)");
}
}
else
{
alert("Nope, you're a naughty hacker.")
}
}
}
이번의 login.js 파일은 다음과 같다.
if (username == TheUsername && password == ThePassword) 를 보면 username 이 TheUsername 이랑 같아야 하고 password 는 ThePassword 랑 같아야 한다.
각각 Split 에서 : 를 구분자로 해서 나뉘어 들어가니까.
username : GOD password : HIDDEN 이 답이겠다.
'WriteUp > Root-me.org' 카테고리의 다른 글
Javascript - Obfuscation 3 (0) | 2020.06.03 |
---|---|
Javascript - Native code (0) | 2020.06.03 |
Javascript - Obfuscation 2 (0) | 2020.06.03 |
Javascript - Obfuscation 1 (0) | 2020.06.03 |
Javascript - Source (0) | 2020.06.03 |