diff options
Diffstat (limited to 'src/login_cram.js')
-rw-r--r-- | src/login_cram.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/login_cram.js b/src/login_cram.js new file mode 100644 index 0000000..7faa646 --- /dev/null +++ b/src/login_cram.js @@ -0,0 +1,9 @@ +import HmacMD5 from 'crypto-js/hmac-md5'; + +document.login1.submit_button.disabled = false; + +document.forms.login1.addEventListener("formdata", (form_data_evt) => { + const form_data = form_data_evt.formData; + const res = HmacMD5(form_data.get("challenge"), form_data.get("password")); + form_data.set("password", res); +}); |