mirror of
https://github.com/bkerler/mtkclient.git
synced 2024-11-14 11:14:56 -05:00
Fix sla issue
This commit is contained in:
parent
8fff2aba85
commit
2a8131d881
2 changed files with 5 additions and 2 deletions
|
@ -8,6 +8,8 @@ import sys
|
|||
from binascii import hexlify
|
||||
from struct import pack, unpack
|
||||
|
||||
from Cryptodome.Util.number import long_to_bytes
|
||||
|
||||
from mtkclient.Library.Auth.sla import generate_da_sla_signature
|
||||
from mtkclient.Library.DA.xflash.xflash_flash_param import NandExtension
|
||||
from mtkclient.Library.DA.xflash.xflash_param import Cmd, ChecksumAlgorithm, FtSystemOSE, DataType
|
||||
|
@ -1142,7 +1144,7 @@ class DAXFlash(metaclass=LogBase):
|
|||
rsakey = None
|
||||
from mtkclient.Library.Auth.sla_keys import da_sla_keys
|
||||
for key in da_sla_keys:
|
||||
if da2.find(bytes.fromhex(key.n)) != -1:
|
||||
if da2.find(long_to_bytes(key.n)) != -1:
|
||||
rsakey = key
|
||||
break
|
||||
if rsakey is None:
|
||||
|
|
|
@ -7,6 +7,7 @@ from struct import pack, unpack
|
|||
from queue import Queue
|
||||
from threading import Thread
|
||||
|
||||
from Cryptodome.Util.number import long_to_bytes
|
||||
from Cryptodome.Cipher import PKCS1_OAEP
|
||||
from Cryptodome.Hash import SHA256
|
||||
from Cryptodome.PublicKey import RSA
|
||||
|
@ -624,7 +625,7 @@ class DAXML(metaclass=LogBase):
|
|||
from mtkclient.Library.Auth.sla_keys import da_sla_keys, SlaKey
|
||||
for key in da_sla_keys:
|
||||
if isinstance(key, SlaKey):
|
||||
if da2.find(bytes.fromhex(key.n)) != -1:
|
||||
if da2.find(long_to_bytes(key.n)) != -1:
|
||||
rsakey = key
|
||||
if rsakey is None:
|
||||
print("No valid sla key found, using dummy auth ....")
|
||||
|
|
Loading…
Reference in a new issue