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 admin = "notadmin"
|
||||||
|
|
||||||
var string = `${nonce.nonce}\0${username}\0${password}\0${admin}`
|
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" }})
|
const hasher = new jsSHA("SHA-1", "TEXT", { hmacKey : { value : sharedsecret, format: "TEXT" }})
|
||||||
hasher.update(string)
|
hasher.update(string)
|
||||||
var hmac = hasher.getHash('HEX')
|
var hmac = hasher.getHash('HEX')
|
||||||
|
|
||||||
|
console.log("HMAC: ", hmac)
|
||||||
|
|
||||||
var register_body = JSON.stringify({
|
var register_body = JSON.stringify({
|
||||||
"nonce": nonce.nonce,
|
"nonce": nonce.nonce,
|
||||||
"username": displayname,
|
"username": displayname,
|
||||||
|
@ -33,6 +35,7 @@ async function submitForm() {
|
||||||
body: register_body
|
body: register_body
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log(await register_request.statusText)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue