2024 LACTF - terms-and-conditions
Overview
- 771 solves / 106 points
- author: aplet123
Description
Welcome to LA CTF 2024! All you have to do is accept the terms and conditions and you get a flag!
Attached
Analyzation
Let’s visit the site
The button, for sure, cannot be clicked by mouse. It must be “clicked” by console.
But when the console is opened, the site becomes blank and…
Look in the source code to find the reason why
let width = window.innerWidth;
let height = window.innerHeight;
setInterval(function() {
if (window.innerHeight !== height || window.innerWidth !== width) {
document.body.innerHTML = "<div><h1>NO CONSOLE ALLOWED</h1></div>";
height = window.innerHeight;
width = window.innerWidth;
}
}, 10);
Solution
It only does that if the dimensions of the window changes after it loads.
So let’s just leave the console there and refresh, and the console is on.
Then run the js command
document.getElementById("accept").click()
The flag is
lactf{that_button_was_definitely_not_one_of_the_terms}