File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments