Skip to content

Commit

Permalink
login: fix hex error on py2
Browse files Browse the repository at this point in the history
Signed-off-by: Sandmann79 <sandmann79@gmx.net>
  • Loading branch information
Sandmann79 committed Sep 22, 2023
1 parent 71241ff commit 953590a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugin.video.amazon-test/resources/lib/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from hashlib import sha256
from os.path import join as OSPJoin
from uuid import uuid4
from binascii import hexlify

import pyxbmct
from kodi_six import xbmcgui, xbmc, xbmcvfs
Expand Down Expand Up @@ -366,7 +367,7 @@ def LoginLock():
'Upgrade-Insecure-Requests': '1'
})
else:
clientid = (user['deviceid'].encode() + b'#A1MPSLFC7L5AFK').hex() # + _g.dtid_android.encode()).hex()
clientid = hexlify(user['deviceid'].encode() + b'#A1MPSLFC7L5AFK') # + _g.dtid_android.encode()).hex()
verifier = urlsafe_b64encode(os.urandom(32)).rstrip(b"=")
challenge = urlsafe_b64encode(sha256(verifier).digest()).rstrip(b"=")
frc = b64encode(os.urandom(313)).decode("ascii")
Expand Down

0 comments on commit 953590a

Please sign in to comment.