This repository has been archived on 2025-01-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
test_dev/src/public/math_abi.html
2025-01-29 14:26:45 +00:00

41 lines
1.5 KiB
HTML

<html>
<head>
<title>Hacking Game...</title>
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<form id="math-form">
<div class="math-div"><img class="math-image" src="./pictures/background04.png"><input class="math-mask"
type="text" id="nullstelle" name="nullstelle"><button id="abgeben-button" type="submit">Abgeben</button>
<div class="hidden" id="wrong-solution">f</div>
</div>
<h3>Solve the task...</h3>
</form>
<script>checkInput = function (nullstelle) {
nullstelle = btoa(nullstelle);
if (nullstelle == "MA==") {
return true;
} else {
return false;
}
}
document.getElementById("math-form").addEventListener("submit", function (event) {
event.preventDefault();
let nullstelle = document.getElementById("nullstelle").value;
if (checkInput(nullstelle)) {
document.getElementById("wrong-solution").classList.add("hidden");
document.getElementById("wrong-solution").classList.remove("visible");
window.location.href = "/access/false/safebox.html";
}
else {
document.getElementById("nullstelle").focus();
document.getElementById("wrong-solution").classList.remove("hidden");
document.getElementById("wrong-solution").classList.add("visible");
}
});</script>
</body>
</html>