@@ -172,8 +172,11 @@ def get_params_for_dji_imah_fwsig(modl_inp_fn):
172172 module_changes_limit = 2 + 256 + 3 * 16
173173 elif (m := re .match (r'^.*/(hg330)([._].*)?[.](bin|cfg|enc|fw|img|sig|ta|txt)$' , modl_inp_fn , re .IGNORECASE )):
174174 platform = m .group (1 )
175- if False :
176- pass # no quirks
175+ # specific first level modules
176+ if (re .match (r'^.*{:s}_1202_[^/]*[.]fw[.]sig$' .format (platform ), modl_inp_fn , re .IGNORECASE )): # the module uses 2048-bit PRAK
177+ module_cmdopts = "-k PRAK-9999-99 -k UFIE-9999-99 -f" # UFIE not published, forcing extract encrypted
178+ # allow change of 2 bytes from auth key name, 256+16 from signature, up to 3x16 chunk padding
179+ module_changes_limit = 2 + 256 + 16 + 3 * 16
177180 else : # if first level module
178181 module_cmdopts = "-k PRAK-2021-09 -k UFIE-9999-99 -f" # UFIE not published, forcing extract encrypted
179182 # allow change of 2 bytes from auth key name, 384+32 from signature, up to 3x16 chunk padding
@@ -518,11 +521,10 @@ def get_params_for_dji_imah_fwsig(modl_inp_fn):
518521 elif (m := re .match (r'^.*/(wm265e|wm265m|wm265t)([._].*)?[.](bin|cfg|enc|fw|img|sig|ta|txt)$' , modl_inp_fn , re .IGNORECASE )):
519522 platform = m .group (1 )
520523 # specific first level modules
521- platform = m .group (1 )
522524 if (re .match (r'^.*{:s}_1502_[^/]*[.]fw[.]sig$' .format (platform ), modl_inp_fn , re .IGNORECASE )): # the module uses 2048-bit PRAK
523525 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
526+ # allow change of 2 bytes from auth key name, 256+16 from signature, up to 3x16 chunk padding
527+ module_changes_limit = 2 + 256 + 16 + 3 * 16
526528 else : # if first level module
527529 module_cmdopts = "-k PRAK-9999-98 -k UFIE-9999-99 -f" # UFIE not published, forcing extract encrypted
528530 # allow change of 2 bytes from auth key name, 384+32 from signature, up to 3x16 chunk padding
@@ -578,11 +580,11 @@ def get_params_for_dji_imah_fwsig(modl_inp_fn):
578580 module_changes_limit = 2 + 4 + 4 + 256 + 9 * 16 + 32 + 6 * 16
579581 # specific nested modules
580582 elif (re .match (r'^.*{:s}_0802_[^/]*[.]fw_0802.*$' .format (platform ), modl_inp_fn , re .IGNORECASE )):
581- module_cmdopts = "-k PRAK-2021-09 -k TBIE-2020-02 " # first level key is not publihed , making this unused
583+ module_cmdopts = "-k PRAK-2021-09 -k TBIE-2021-08 " # first level key is not published , making this unused
582584 # allow change of 2 bytes from auth key name, 384+32 from signature, up to 3x16 chunk padding
583585 module_changes_limit = 2 + 384 + 32 + 3 * 16
584586 # specific first level modules with different keys
585- elif (re .match (r'^.*/(wm260|wm2605) _0802_v[0-9a-z_.-]*[.]pro[.]fw[.]sig$' , modl_inp_fn , re .IGNORECASE )):
587+ elif (re .match (r'^.*{:s} _0802_v[0-9a-z_.-]*[.]pro[.]fw[.]sig$' . format ( platform ) , modl_inp_fn , re .IGNORECASE )):
586588 module_cmdopts = "-k PRAK-2021-09 -k UFIE-2021-08 -f" # UFIE not published, forcing extract encrypted
587589 # allow change of 2 bytes from auth key name, 384+32 from signature, up to 3x16 chunk padding
588590 module_changes_limit = 2 + 384 + 32 + 3 * 16
0 commit comments