Javascript console says: Invalid left-side assignment? -
so, make secure login. run through chrome's javascript console , 'uncaught referenceerror: invalid left-hand side in assignment '?! please help!
function login() { string.prototype.hashcode = function() { for(var ret = 0, = 0, len = this.length; < len; i++) { ret = (31 * ret + this.charcodeat(i)) << 0; } return ret; }; var user = document.getelementbyid("username"), pass = document.getelementbyid("password"); if ((user = "fedora") && (pass.hashcode() = -976887139)) { window.alert("captain fedora: superuser"); } }
if ((user = "fedora") && (pass.hashcode() = -976887139))
should be
if ((user == "fedora") && (pass.hashcode() == -976887139))
so comparison, , not assignment
Comments
Post a Comment