From 3e8cea2da142f506f276173e3931a5df8d6a06d1 Mon Sep 17 00:00:00 2001 From: lauralani Date: Fri, 18 Aug 2023 23:43:50 +0200 Subject: [PATCH] update script --- static/script.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/script.js b/static/script.js index 73d74c0..f612eba 100644 --- a/static/script.js +++ b/static/script.js @@ -13,12 +13,14 @@ async function submitForm() { var admin = "notadmin" var string = `${nonce.nonce}\0${username}\0${password}\0${admin}` - + console.log("String: ", string) const hasher = new jsSHA("SHA-1", "TEXT", { hmacKey : { value : sharedsecret, format: "TEXT" }}) hasher.update(string) var hmac = hasher.getHash('HEX') + console.log("HMAC: ", hmac) + var register_body = JSON.stringify({ "nonce": nonce.nonce, "username": displayname, @@ -33,7 +35,8 @@ async function submitForm() { body: register_body }) - + console.log(await register_request.statusText) + } function HandlePasswordInput() {