Skip to content

Commit dadb266

Browse files
committed
tests: Mark wm265e m1502 as using different keys
The module wm265e_1502* uses different keys than other modules of this drone.
1 parent 3016bdd commit dadb266

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/test_dji_imah_fwsig_rebin1.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ def get_params_for_dji_imah_fwsig(modl_inp_fn):
7878
"""
7979
module_cmdopts = ""
8080
module_changes_limit = 0
81+
# set parameters (keys, mostly) to extract specific known firmware files
82+
# use xxAK-9999-99 for unknown 256-byte auth key, xxAK-9999-98 for unknown 384-byte auth key
8183
if (m := re.match(r'^.*/(ac103)([._].*)?[.](bin|cfg|enc|fw|img|sig|ta|txt)$', modl_inp_fn, re.IGNORECASE)):
8284
platform = m.group(1)
8385
if False:
@@ -515,8 +517,12 @@ def get_params_for_dji_imah_fwsig(modl_inp_fn):
515517
module_changes_limit = 2 + 4 + 4 + 256 + 32+16
516518
elif (m := re.match(r'^.*/(wm265e|wm265m|wm265t)([._].*)?[.](bin|cfg|enc|fw|img|sig|ta|txt)$', modl_inp_fn, re.IGNORECASE)):
517519
platform = m.group(1)
518-
if False:
519-
pass # no quirks
520+
# specific first level modules
521+
platform = m.group(1)
522+
if (re.match(r'^.*{:s}_1502_[^/]*[.]fw[.]sig$'.format(platform), modl_inp_fn, re.IGNORECASE)): # the module uses 2048-bit PRAK
523+
module_cmdopts = "-k PRAK-9999-99 -k UFIE-9999-99 -f" # UFIE not published, forcing extract encrypted
524+
# allow change of 2 bytes from auth key name, 256 from signature, up to 3x16 chunk padding
525+
module_changes_limit = 2 + 256 + 3*16
520526
else: # if first level module
521527
module_cmdopts = "-k PRAK-9999-98 -k UFIE-9999-99 -f" # UFIE not published, forcing extract encrypted
522528
# allow change of 2 bytes from auth key name, 384+32 from signature, up to 3x16 chunk padding

0 commit comments

Comments
 (0)