Reply
Wed 28 Mar, 2007 07:21 pm
Breaking this code:
<script>
function boh() {
alert(huh(document.formular.pass.value) ? "Righty captain! Enter the password in the box below." : "Not even close!");
}
function huh(pw) {
var b = Array(8, 0, 28, 20, 20, 12, 0, 8);
var c = Array(0x71B131DD, 0xD965BB95, 0x99351B35, 0x313BB71B);
for(var i=0; i<pw.length; i+=4) {
var tmp = 0;
for(var j=0; j<b>3) ? 0xF0 : 0xF)) <<b>>=1)
tmp ^= (c[i/4] & 1) << j--;
if(++tmp) break;
}
return(i==16);
}
</script>
Can someone help me? Basically, I need to somehow figure out what the password is, and deriving from the pw.length; i+=4 I think it is safe to say that it is four chars? And the info in the arrays is the password, hashed?
Is this for a Javascript class?
formular is what? a js class?