abrignoni / abrignoni/iLEAPP

Reading discordmanifest artifact had errors! - 'charmap' codec can't decode byte 0x9d in position 1331: character maps to <undefined>

Đang mở
#1,093 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
1.2k
Fork
303
Merge trung bình
4 giờ 32 phút
Pull request đã merge (30 ngày)
216

Mô tả

Hi,

I was trying to parse an iTunes backup on Windows, and the discordManifest.py module crashes with this error:

```
Reading discordmanifest artifact had errors!
Error was 'charmap' codec can't decode byte 0x9d in position 1331: character maps to
Exception Traceback: Traceback (most recent call last):
File "C:\Users\DFIR\Downloads\iLEAPP\ileapp.py", line 426, in crunch_artifacts
artifact_data = plugin.method(files_found, category_folder, seeker, wrap_text, time_offset)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\DFIR\Downloads\iLEAPP\scripts\artifacts\discordManifest.py", line 19, in get_discordManifest
for jsondata in f_in:
^^^^
File "C:\Users\DFIR\AppData\Local\Programs\Python\Python312\Lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 1331: character maps to
```

It seems like it is related with the `open` function missing an encoding parameter.

I added `encoding="utf8"` in it, and it is working.

But, I think that the definition of the artifact it too generic, because it is extracting not only Discord, but also other apps that have this path:
`*/mobile/Containers/Data/Application/*/Documents/RCTAsyncLocalStorage_V1/manifest.json`.

Hope it helps!

Thanks!

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.