Created
March 22, 2015 17:45
-
-
Save vanhoefm/eb833025c60fec808042 to your computer and use it in GitHub Desktop.
Codegate 2015
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function validate() { | |
var x = document.forms["formxx"]["pwz"].value; | |
alert(x); | |
if (x == null || x == "") { | |
alert("Password must be filled out"); | |
return false; | |
} | |
if (!x.match(/^[A-Za-z]+$/)) { | |
alert("Bad charset"); | |
return false; | |
} | |
if (!sha1(x).match(/^ff7b948953ac/)) | |
{ | |
return false; | |
} | |
alert("Flag: " + x); | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment