update script
This commit is contained in:
parent
e28dfbe603
commit
3e8cea2da1
1 changed files with 5 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue