Skip to content

Commit b7ec43b

Browse files
committed
dji_imah_fwsig: One more wm265e FW uses old wm260 keys
1 parent e64be51 commit b7ec43b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_dji_imah_fwsig_rebin1.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,8 @@ def get_params_for_dji_imah_fwsig(modl_inp_fn):
521521
elif (m := re.match(r'^.*/(wm265e)([._].*)?[.](bin|cfg|enc|fw|img|sig|ta|txt)$', modl_inp_fn, re.IGNORECASE)):
522522
platform = m.group(1)
523523
# specific FW version with keys reused from wm260
524-
if (re.match(r'^.*/V00.01.0101[^/]*/{:s}.*$'.format(platform), modl_inp_fn, re.IGNORECASE)):
524+
if (re.match(r'^.*/V00.01.0101[^/]*/{:s}.*$'.format(platform), modl_inp_fn, re.IGNORECASE) or
525+
re.match(r'^.*/V90.00.0001[^/]*/{:s}.*$'.format(platform), modl_inp_fn, re.IGNORECASE)):
525526
# specific nested modules
526527
if (re.match(r'^.*{:s}_1502_[^/]*[.]fw_1502.*adsb_soc[^/]*[.]img[.]sig$'.format(platform), modl_inp_fn, re.IGNORECASE)):
527528
module_cmdopts = "-k PRAK-2020-04 -k TBIE-9999-99 -f" # TBIE not published, forcing extract encrypted
@@ -554,8 +555,8 @@ def get_params_for_dji_imah_fwsig(modl_inp_fn):
554555
# specific first level modules with different keys
555556
elif (re.match(r'^.*{:s}_1502_[^/]*[.]fw[.]sig$'.format(platform), modl_inp_fn, re.IGNORECASE)):
556557
module_cmdopts = "-k PRAK-9999-99 -k UFIE-9999-99 -f" # UFIE not published, forcing extract encrypted
557-
# allow change of 2 bytes from auth key name, 256+16 from signature, up to 3x16 chunk padding
558-
module_changes_limit = 2 + 256 + 16 + 3*16
558+
# allow change of 2 bytes from auth key name, 4+4 from enc+dec checksum, 256 from signature, up to 9x16 chunk padding, 32 payload digest, 6x16 unknown additional
559+
module_changes_limit = 2 + 4 + 4 + 256 + 9*16 + 32 + 6*16
559560
else: # if first level module
560561
module_cmdopts = "-k PRAK-9999-98 -k UFIE-9999-99 -f" # UFIE not published, forcing extract encrypted
561562
# allow change of 2 bytes from auth key name, 384+32 from signature, up to 3x16 chunk padding

0 commit comments

Comments
 (0)