Open vineet131 opened 3 years ago
did you ever work this out?
did you ever work this out?
Unfortunately not. I improvised and just deleted the unwanted characters between the starting and ending curly braces of the actual JSON dict.
I ended up using the alternative method of getting the sqlite database like it says on this repo: https://github.com/olejorgenb/ColorNote-backup-decryptor
I ended up using the alternative method of getting the sqlite database like it says on this repo: https://github.com/olejorgenb/ColorNote-backup-decryptor
Thank you, I will take a look at it. How did you do this? Maybe you could submit a PR or fork the library and make changes to combine the two.
I didn't code anything. I did the whole getting the .db file from a rooted android thing: https://dbohdan.com/wiki/colornote
@vineet131 Could you share a .doc
file which has the encoding problem ?
@vineet131 Could you share a
.doc
file which has the encoding problem ?
Here you go! Deleted most of the data, but you can get a gist of it
I didn't code anything. I did the whole getting the .db file from a rooted android thing: https://dbohdan.com/wiki/colornote
Thank you for this! I wasn't aware, let me check it out. But would be so nice if I can do this via Python
In fact, I don't understand the structure of the decrypted data. Usually, we have: But in your file, we cannot see the beginning of the JSON part and the length is invalid:
Well, I used the same code as I pointed out in the first comment. Does this have something to do with the fact that I don't use English characters, and your code only accounts for notes written in English?
After using
python decode-ColorNote.py -p xxxx c:\folder
my file decodes perfectly fine, as evident from thenotes.bin
file but I still getUnicodeDecodeError: 'utf-8' codec can't decode byte 0xf7 in position 1939: invalid start byte
.Now my notes are in multiple languages but opening
notes.bin
in Notepad++ and setting it to UTF-8 shows that they translate well and without any problem. But in between the notes, there are characters like\x0\x0\x0\x2\x0\x0\x1\xF7\x0\x0\x2\xA0
and this is where the problem is coming from.I tried setting
json_chunk = json.loads(chunk.decode("utf-8", "ignore"))
but that just leads tojson.decoder.JSONDecodeError: Extra data: line 1 column 7 (char 6)
since the decoded file doesn't seem to be formatted in a proper JSON format. Any help would be appreciated