Skip to content

Instantly share code, notes, and snippets.

@vanhoefm
Created March 22, 2015 17:49
Show Gist options
  • Save vanhoefm/58e287257277dcae8e78 to your computer and use it in GitHub Desktop.
Save vanhoefm/58e287257277dcae8e78 to your computer and use it in GitHub Desktop.
Codegate 2015
function validate() {
var x = document.forms["formxx"]["pwz"].value;
if (!x.match(/^[A-Za-z]+$/))
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