Skip to content

Instantly share code, notes, and snippets.

@Alekseyyy
Created October 23, 2021 04:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Alekseyyy/0aea9b4ba8a6a3f88c164ba033dbcf91 to your computer and use it in GitHub Desktop.
Save Alekseyyy/0aea9b4ba8a6a3f88c164ba033dbcf91 to your computer and use it in GitHub Desktop.
function checkCreds() {
if (username.value == "Admin" && atob(password.value) == "goldenticket")
{
var key = atob(encoded_key);
var flag = "";
for (let i = 0; i < key.length; i++)
{
flag += String.fromCharCode(key.charCodeAt(i) ^ password.value.charCodeAt(i % password.value.length))
}
document.getElementById("banner").style.display = "none";
document.getElementById("formdiv").style.display = "none";
document.getElementById("message").style.display = "none";
document.getElementById("final_flag").innerText = flag;
document.getElementById("winner").style.display = "block";
}
else
{
document.getElementById("message").style.display = "block";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment