Tools icon indicating copy to clipboard operation
Tools copied to clipboard

Cannot encrypt due to UTF-8 error

Open TimPeterson opened this issue 11 months ago • 1 comments

I have an IPC-T5442TM-AS running firmware V2.820.15OG001.0.R. I was able to extract and decrypt the configuration using key "IPC-HDW5442TP-AS", but I cannot re-encrypt that decrypted file due to this error:

[*] Dahua Config Backup Decrypt/Encrypt by bashis <mcw noemail eu> (2021) [*]

'utf-8' codec can't decode byte 0xb3 in position 87345: invalid start byte
[!] Input not valid JSON file

The problematic part of the config file is this:

"OSD":{"OSDCustomizeSort":[{"Element":[{"Name":"%09","NameType":0,"Postfix":"","Prefix":"³µÅÆ£º","SeperaterCount":1},{"Name":"%46","NameType":0,"Postfix":"","Prefix":"³µ±ê£º","SeperaterCount":1},{"Name":"%61","NameType":0,"Postfix":"","Prefix":"³µÁ¾ÀàÐÍ£º","SeperaterCount":1},{"Name":"%12","NameType":0,"Postfix":"","Prefix":"³µÉíÑÕÉ«£º","SeperaterCount":1}]}],"OSDOrder":"%09%46%61%12","Seperater":" "}

It is unclear to me what those fields are meant to represent, but I would have to guess that it's Chinese text that got mangled somewhere in the pipeline.

TimPeterson avatar Jul 22 '23 16:07 TimPeterson