I'm building a php login form with only a username
& password
as $_POST data. But before submitting the form, a JS function check()
will base64_encode the password
input, then finally submits the form like this: (the customized base64_enc function is a little bit more advance than just a base64 encode)
function check() {
var pwd = $_get_by_id('loginPw').value;
$_get_by_id('loginPw').value = base64_enc(pwd);
$_get_by_id('loginFrm').submit();
}
Of course, beside that, I know we have pleinty of security things to prevent the brute force (session id, csrf token, captcha, tempo ban...).
But I wonder if, at this point, this simple javascript trick could slow down an attack ? (Even the attacker must generate another processed version of his/her dictionaries)
For example if hydra tool can process each line of wordlist before running a thread (with a shell code version of what we have in the javascript check() fn)