Register non-official devices
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
import time
|
import time
|
||||||
import json
|
import json
|
||||||
import jwt
|
import jwt
|
||||||
|
import random, string
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
@@ -75,7 +76,9 @@ def register(show_spinner=False) -> Optional[str]:
|
|||||||
|
|
||||||
if resp.status_code in (402, 403):
|
if resp.status_code in (402, 403):
|
||||||
cloudlog.info(f"Unable to register device, got {resp.status_code}")
|
cloudlog.info(f"Unable to register device, got {resp.status_code}")
|
||||||
dongle_id = UNREGISTERED_DONGLE_ID
|
dongle_id = ''.join(random.choices(string.ascii_lowercase + string.digits, k=16))
|
||||||
|
params.put_bool("FireTheBabysitter", True)
|
||||||
|
params.put_bool("NoLogging", True)
|
||||||
else:
|
else:
|
||||||
dongleauth = json.loads(resp.text)
|
dongleauth = json.loads(resp.text)
|
||||||
dongle_id = dongleauth["dongle_id"]
|
dongle_id = dongleauth["dongle_id"]
|
||||||
|
|||||||
Reference in New Issue
Block a user