Hi everyone,
This is my homework for cybersecurity class
I need to find the password from the javascript
I really got stuck here.
Can someone show me the steps on how to figure out the password?
Thanks for the help
<!doctype html>
Challenge 3
Find the password!
Hint: There's a bad function in here.
CheckThanks for Playing
<script>
function init() {
var btnGo = document.getElementById("btnGo");
btnGo.onclick = function () {
var myPass = document.getElementById("myPass").value;
var myOut = document.getElementById("output");
if (fun_times(myPass)) {
myOut.innerHTML = "Authenticated!";
} else {
myOut.innerHTML = "Incorrect!";
}
}
}
function fun_times(aString) {
var mess = "dmFyIHBhc3MgPSAiZXZhbGlzZXZpbCI7DQppZiAoYVN0cmluZyA9PT0gcGFzcykgew0KCXN1Y2Nlc3MgPTE7DQp9IGVsc2Ugew0KCXN1Y2Nlc3MgPTA7DQp9";
eval(atob(mess));
if (success) {
return true;
} else {
return false;
}
}
window.onload = init;
</script>
</body>